xf_user table import/export....

Sheldon

Well-known member
I have a question....

I am trying to save a certain column in my table xf_user. Once I uninstall an add-on, it will be wiped and removed, then I am would like to install a newer version, and just bring back the old column information and over-write the newly installed column.

Like this:

xf_user
---sportsbook_cash (different user amounts contained, copy somehow)

Delete Sportsbook add-on.

Install new version

then back to this again:
xf_user
---sportsbook_cash (new version, all set at 0)

Import just that column, overwriting the new sportsbook_cash information (all 0's) with the old sportsbook_cash information (misc amounts).

I am sorry if I didn't explain that the best way, I am not the greatest with MySQL, still trying to learn (as you can see from the above). Is this even possible?
 
If the column is identical, why do you need to delete and recreate it?

Why not just export the xf_user table, uninstall the add-on, install the new version, import the xf_user table.

That should achieve what you want.
 
If the column is identical, why do you need to delete and recreate it?

Why not just export the xf_user table, uninstall the add-on, install the new version, import the xf_user table.

That should achieve what you want.


Yeah, I think though with the install, it will give an error because it will try to create the same table again.
 
Import the table after you install the new version of the add-on.

Just drop the old table first.
 
Ok, how do I go about bringing in just that part, the sportsbook_cash part? I don't want to drop the entire xf_user table, then import it do I?

I see what you are saying now.
 
if the sequence of fields (columns) did not match with newer column.... is it still working after importing...?
 
Another way would be to alter the name of the column sportsbook_cash_old. Run the install. Remove the current sportsbook_cash column that is empty and rename the sportsbook_cash_old to sportsbook_cash.
 
Top Bottom