Created
November 2, 2015 22:21
-
-
Save chasetb/6efe8bde00c7c873e658 to your computer and use it in GitHub Desktop.
1061, "Duplicate key name 'inventory_inventoryitem_bundleid_97240f472ca5177_uniq'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/sal_env/sal$ python manage.py syncdb | |
Operations to perform: | |
Synchronize unmigrated apps: sal, staticfiles, admindocs, axes, messages, api, bootstrap3 | |
Apply all migrations: watson, sessions, admin, sites, auth, server, contenttypes, inventory, licenses | |
Synchronizing apps without migrations: | |
Creating tables... | |
Running deferred SQL... | |
Installing custom SQL... | |
Running migrations: | |
Rendering model states... DONE | |
Applying inventory.0002_auto_20151026_0845...Traceback (most recent call last): | |
File "manage.py", line 10, in <module> | |
execute_from_command_line(sys.argv) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line | |
utility.execute() | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 343, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv | |
self.execute(*args, **cmd_options) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute | |
output = self.handle(*args, **options) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 25, in handle | |
call_command("migrate", **options) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command | |
return command.execute(*args, **defaults) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute | |
output = self.handle(*args, **options) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 222, in handle | |
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 110, in migrate | |
self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 148, in apply_migration | |
state = migration.apply(state, schema_editor) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 115, in apply | |
operation.database_forwards(self.app_label, schema_editor, old_state, project_state) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 201, in database_forwards | |
schema_editor.alter_field(from_model, from_field, to_field) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 484, in alter_field | |
old_db_params, new_db_params, strict) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 670, in _alter_field | |
self.execute(self._create_index_sql(model, [new_field], suffix="_uniq")) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 111, in execute | |
cursor.execute(sql, params) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute | |
return self.cursor.execute(sql, params) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__ | |
six.reraise(dj_exc_type, dj_exc_value, traceback) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute | |
return self.cursor.execute(sql, params) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute | |
return self.cursor.execute(query, args) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute | |
self.errorhandler(self, exc, value) | |
File "/usr/local/sal_env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler | |
raise errorclass, errorvalue | |
django.db.utils.OperationalError: (1061, "Duplicate key name 'inventory_inventoryitem_bundleid_97240f472ca5177_uniq'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment