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
Migrations not working - Thinks table exists that does not #26
Comments
Failing Migration:
|
I can not reproduce this problem. What I did:
All is working fine without broken migrations. Test migration from PyPi (Django 1.4):
and all is ok. Test migration from PyPi (Django 1.8):
... all is ok. Give me a Django and MySQL version. And show me how I can reproduce this problem. |
Django 1.7.4 Mysql 5.5 |
Can u run my examples? |
I can't, south doesn't work on 1.7. I've discovered that even if I remove all traces of this library, and drop tables it still happens. I can get the error to change slightly. First it will output this:
And thend if I run Migrate again it goes to this output:
If I drop only that table, it reverts to the same first error. It seems that because this migration fails python2.7/site-packages/dbmail/migrations/0006_auto_20150708_0714.py:
Also now when I uninstalled this software and dropped all tables to start fresh, it only creates the the mailsubscription table when running migrations. When I research the first error I see that it looks like it's possibly related to the engine being used? http://stackoverflow.com/questions/1457305/mysql-creating-tables-with-foreign-keys-giving-errno-150 |
Use my examples above. Test migration from PyPi (Django 1.7. Logs here https://gist.github.com/gotlium/87a2110bf1a7b43b7312):
... all is ok. |
Check your DB engine. Maybe you are using InnoDB with MyISAM? or you have a problem with AUTH_USER_MODEL?
you should cleanup migration table. You are getting This problem can not be reproduced at standard installation without sources, settings and environment. |
Additional info about alter fk (http://stackoverflow.com/questions/16866318/adding-foreign-key-fails-in-mysql-errno-150)
Can you try mysql 5.6 to reproduce your problem? |
Sure enough.
So I'm looking and I see: which isn't compatible with: My question here is what is advised, changing the dbmail table is more advisable as it doesn't have any data in it doesn't seem to be a issue on any other ones. I removed migrations and removed tables again, ran from fresh install on same db, with same error. So obviously these don't match up. I went in and changed the collation and engine of auth_user to as db_mailsubscription. This must have occurred by accident by myself. This database orignally lived on a 5.1 Mysql instance, and was upgraded to 5.5, new tables were being created in InnoDB, and old were created in MyISAM. Thank you for the help.
|
Getting the below error when upgrading from 2.02 to Current stable. Funny thing is, I've searched the table and there is NO dbmail_mailsubscription in the DB. So I don't know why this migration think's it's there.
RHEL 6.6 Python 2.7.10
The text was updated successfully, but these errors were encountered: