Re: After update, auth migration fails.

2017-12-20 Thread Andrew Buchan
OK, I solved it. Migrations attempted to modify auth.user, but it seems MYSQL checks the referential integrity of any child table with a FK to the table being modified. My child table had bad foreign keys, hence the error during migration. Side note: whe way I got these foreign key errors was

Re: After update, auth migration fails.

2017-12-18 Thread Andrew Buchan
That is actually pretty helpful... I think it means one of the users records which my table references was deleted, but the deletion does not cascade, nor set the user_id to null in the child record, so I have an orphan record. This is allowed because it has null=True, even though the orphan re

Re: After update, auth migration fails.

2017-12-18 Thread Dylan Reinhold
Andrew, Not real sure on the fix, but the error seems more to be data related. Is it just saying it's trying to add a record that exits? For the MySQL issue, the foreign key is on the 'id' field in user, which is not changing size, just the username field. So I don't think that is the issue you a

Re: After update, auth migration fails.

2017-12-18 Thread Andrew Buchan
Can anyone help with this one at all? It is: a) pretty critical for my project to get this update because it has a fix for django's DecimalValidator bug which is causing a bug in the app. b) something I expect that tons of people would have encountered Or am I wrong about that last bit? Thanks,

After update, auth migration fails.

2017-12-15 Thread Andrew Buchan
Hi everyone, Vital stats: MySQL, python 3.5, Ubuntu, not using South. I'm upgrading from 1.9.5 to 1.11.8, and in amongst that there is a migration to change to username field length in auth: auth [X] 0001_initial [X] 0002_alter_permission_name_max_length [X] 0003_alter_user_email_max_length