hiperesp/DragonFable-Private-Server

Create migrate dev method

Closed this issue · 0 comments

Create migrate dev method:

Use a migration prefix using the defined prefix, like:
If the defined prefix is df_, use a migration prefix like df_migration_.
If any table with df_migration_ prefix is found, stop it and tell the admin to wait or remove the tables with this prefix.
Now, create all collections and insert data using this prefix.
After, select the df_ user-data tables and insert this data into new df_migration_ user-data table
After done, call the storage driver to rename all df_ without df_migration_ to df_backup202410170118999999_ (with a timestamp + random generated data).
After renaming the old data to backup, rename the new data df_migration_ to df_ prefix.