You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi all
I got this error while migrating app in django. I am using mysql
FATAL ERROR - The following SQL query failed: ALTER TABLE `my_table` ADD CONSTRAINT `my_table_my_field_18bc0d26_uniq` UNIQUE (`my_field`) The error was: (1062, "Duplicate entry '123' for key 'my_table_my_field_18bc0d26_uniq'") ! Error found during real run of migration! Aborting.
! Since you have a database that does not support running ! schema-altering statements in transactions, we have had ! to leave it in an interim state between migrations.
! You *might* be able to recover with: - no dry run output for delete_unique_column() due to dynamic DDL, sorry
! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS (one that supports DDL transactions) ! NOTE: The error which caused the migration to fail is further up.
Mysql support south or not?
what should i do?
Thanks,
Ram Ganesh K
Lachlan Musicman
unread,
Aug 21, 2014, 7:05:17 PM8/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi Ram
Yep, South supports MySQL - it's that MySQL doesn't support
schema-altering statements in transactions.
The problem is clearly stated - you are trying to make a field unique
despite the data in that field *not* being unique.
In particular, it looks like you have two entries with value '123'
I would restore the DB from a backup and either remove the unique
constraint or one of the records and then running south again?
--
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing and KEEP THEIR IDIOT
MOUTHS SHUT about it, because it is much more important to sound
intelligent when talking to your friends.
This post was STUPID.
-----------------------------------------------------------------------------------------------------------
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html