Quote from: Boby at Dec 08, 2006, 04:40 PM
I know the easy method would be to make a default update and remove everything except users, but sometimes I’m a freak and want to keep things clean. Can someone tell me please, exactly what DB tables I have to backup and import later on 0.9.5 in order to keep just the webusers and webgroups?
Would this actually work without braking anything else?
IMPORTANT: A typical issue when doing this kind of update is structure changes to one of the tables, so just export the data and don’t include the table structure, or you might compromise the upgrade
Now, a couple of tips...
In the case of simple field additions, if you use the "complete insert" option (-c) when exporting data from these DB tables (assuming you are using PHPMyAdmin or mysql command line), this will include the field list so if any fields were added to a table during the update to 0.9.5, you would still be able to execute the SQL. Without this option, it thinks you are inserting every field and if the number of values don’t match the total number of columns, the SQL will not work.
Also, you can use the "insert ignore" option to make sure you don’t overwrite any existing data in a table -- this generates the export with INSERT IGNORE statements that will fail silently if a record with the same primary key already exists, and can be a way to merge only new records in.
I’m not saying any of these apply here, but might and thought it was a good place to bring it up...but anyway...
The tables to move are listed below (replace modx_ with the table prefix you used when setting up MODx):
[*] modx_webgroup_names
[*] modx_web_groups
[*] modx_web_users
[*] modx_web_user_attributes
[*] modx_web_user_settings
Hope that helps...