-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data loss upgrading from 2.9.1 to 3.1.0 with database backend #528
Comments
It will be fixed soon #531 |
No worries and thanks for your help! |
It seems that fixing this error caused an error for me. System configuration Using |
@Volody2006 show traceback please |
I have just experienced the very same issue with MySQL, fixed it on my own and later found this issue... If anyone lands in here looking for the answer "why": this migration may be indeed fixed, but it is not yet released. I am not sure if the fix works for me either, I had to run this sqls manually to fix it (state was already messed up a bit):
|
On that note, would it be possible to generate a new release with the corrected migration file? |
Our experience with upgrading from 2.9.1 to 3.1.0 was a bit shocking. The newly created table constance_constance was not filled with existing data. The old table constance_config was preserved (luckily). The incomplete transfer also caused the admin interface not saving things and showing a lot of defaults. We've fixed it by running the following query in the database: truncate table constance_constance;
insert into constance_constance select * from constance_config; Hope this helps someone that is feeling the stress :) |
To pick up on @mfisco's comment again: Would it be possible to generate a new release? @camilonova or @sergei-iurchenko So just a suggestion, don't stress about it. Thanks a lot! |
@camilonova please make a new release. I don`t have such permissions |
Describe the problem
Upgrading from 2.9.1 to 3.1.0 and running
python manage migrate
, both migrations appear successful, but the data isn't transferred, nor is the old table dropped.Steps to reproduce
python manage.py migrate
constance_constance
table created from0001_initial
is empty, and the oldconstance_config
table still exists.After some debugging, I think it concerns the SQL in
0002_migrate_from_old_table
. Specifically, If I remove the try/except block, I get the following exception:But by escaping the column names (e.g.
( id, key, value )
→( `id`, `key`, `value` )
), I was able to get the 2nd migration to work (data transferred/old table dropped), leading me to believe it's because of SQL reserved words.System configuration
The text was updated successfully, but these errors were encountered: