| 1 | ./manage.py migrate
|
|---|
| 2 | Operations to perform:
|
|---|
| 3 | Apply all migrations: admin, contenttypes, sessions, mysite, auth
|
|---|
| 4 | Running migrations:
|
|---|
| 5 | Applying contenttypes.0001_initial... OK
|
|---|
| 6 | Applying auth.0001_initial... OK
|
|---|
| 7 | Applying admin.0001_initial... OK
|
|---|
| 8 | Applying mysite.0001_initial... OK
|
|---|
| 9 | Applying mysite.0002_auto... OK
|
|---|
| 10 | Applying sessions.0001_initial... OK
|
|---|
| 11 | (venv)➜ migrations_dj pip install --upgrade 'Django>=1.8'
|
|---|
| 12 | Collecting Django>=1.8
|
|---|
| 13 | Using cached Django-1.8.1-py2.py3-none-any.whl
|
|---|
| 14 | Installing collected packages: Django
|
|---|
| 15 | Found existing installation: Django 1.7.8
|
|---|
| 16 | Uninstalling Django-1.7.8:
|
|---|
| 17 | Successfully uninstalled Django-1.7.8
|
|---|
| 18 | Successfully installed Django-1.8.1
|
|---|
| 19 | (venv)➜ migrations_dj ./manage.py migrate
|
|---|
| 20 | Operations to perform:
|
|---|
| 21 | Synchronize unmigrated apps: staticfiles, messages
|
|---|
| 22 | Apply all migrations: contenttypes, auth, mysite, sessions, admin
|
|---|
| 23 | Synchronizing apps without migrations:
|
|---|
| 24 | Creating tables...
|
|---|
| 25 | Running deferred SQL...
|
|---|
| 26 | Installing custom SQL...
|
|---|
| 27 | Running migrations:
|
|---|
| 28 | Rendering model states... DONE
|
|---|
| 29 | Applying contenttypes.0001_initial... OK
|
|---|
| 30 | Applying auth.0001_initial... OK
|
|---|
| 31 | Applying admin.0001_initial... OK
|
|---|
| 32 | Applying contenttypes.0002_remove_content_type_name... OK
|
|---|
| 33 | Applying auth.0002_alter_permission_name_max_length... OK
|
|---|
| 34 | Applying auth.0003_alter_user_email_max_length... OK
|
|---|
| 35 | Applying auth.0004_alter_user_username_opts... OK
|
|---|
| 36 | Applying auth.0005_alter_user_last_login_null... OK
|
|---|
| 37 | Applying auth.0006_require_contenttypes_0002... OK
|
|---|
| 38 | Applying mysite.0001_initial... OK
|
|---|
| 39 | Applying mysite.0002_auto...Traceback (most recent call last):
|
|---|
| 40 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
|
|---|
| 41 | return self.cursor.execute(sql, params)
|
|---|
| 42 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
|
|---|
| 43 | return self.cursor.execute(query, args)
|
|---|
| 44 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
|
|---|
| 45 | self.errorhandler(self, exc, value)
|
|---|
| 46 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
|
|---|
| 47 | raise errorvalue
|
|---|
| 48 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
|
|---|
| 49 | r = self._query(query)
|
|---|
| 50 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
|
|---|
| 51 | rowcount = self._do_query(q)
|
|---|
| 52 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query
|
|---|
| 53 | db.query(q)
|
|---|
| 54 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
|
|---|
| 55 | _mysql.connection.query(self, query)
|
|---|
| 56 | _mysql_exceptions.OperationalError: (1553, "Cannot drop index 'mysite_mymodelb_a_id_b53c781c93aab9a_uniq': needed in a foreign key constraint")
|
|---|
| 57 |
|
|---|
| 58 | The above exception was the direct cause of the following exception:
|
|---|
| 59 |
|
|---|
| 60 | Traceback (most recent call last):
|
|---|
| 61 | File "./manage.py", line 10, in <module>
|
|---|
| 62 | execute_from_command_line(sys.argv)
|
|---|
| 63 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
|
|---|
| 64 | utility.execute()
|
|---|
| 65 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 330, in execute
|
|---|
| 66 | self.fetch_command(subcommand).run_from_argv(self.argv)
|
|---|
| 67 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/core/management/base.py", line 390, in run_from_argv
|
|---|
| 68 | self.execute(*args, **cmd_options)
|
|---|
| 69 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/core/management/base.py", line 441, in execute
|
|---|
| 70 | output = self.handle(*args, **options)
|
|---|
| 71 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 221, in handle
|
|---|
| 72 | executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
|
|---|
| 73 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/migrations/executor.py", line 110, in migrate
|
|---|
| 74 | self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
|
|---|
| 75 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/migrations/executor.py", line 147, in apply_migration
|
|---|
| 76 | state = migration.apply(state, schema_editor)
|
|---|
| 77 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/migrations/migration.py", line 115, in apply
|
|---|
| 78 | operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
|
|---|
| 79 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/migrations/operations/models.py", line 359, in database_forwards
|
|---|
| 80 | getattr(new_model._meta, self.option_name, set()),
|
|---|
| 81 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/base/schema.py", line 328, in alter_unique_together
|
|---|
| 82 | self.execute(self._delete_constraint_sql(self.sql_delete_unique, model, constraint_names[0]))
|
|---|
| 83 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/base/schema.py", line 111, in execute
|
|---|
| 84 | cursor.execute(sql, params)
|
|---|
| 85 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 79, in execute
|
|---|
| 86 | return super(CursorDebugWrapper, self).execute(sql, params)
|
|---|
| 87 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
|
|---|
| 88 | return self.cursor.execute(sql, params)
|
|---|
| 89 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/utils.py", line 97, in __exit__
|
|---|
| 90 | six.reraise(dj_exc_type, dj_exc_value, traceback)
|
|---|
| 91 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/utils/six.py", line 658, in reraise
|
|---|
| 92 | raise value.with_traceback(tb)
|
|---|
| 93 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
|
|---|
| 94 | return self.cursor.execute(sql, params)
|
|---|
| 95 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
|
|---|
| 96 | return self.cursor.execute(query, args)
|
|---|
| 97 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
|
|---|
| 98 | self.errorhandler(self, exc, value)
|
|---|
| 99 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
|
|---|
| 100 | raise errorvalue
|
|---|
| 101 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
|
|---|
| 102 | r = self._query(query)
|
|---|
| 103 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
|
|---|
| 104 | rowcount = self._do_query(q)
|
|---|
| 105 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query
|
|---|
| 106 | db.query(q)
|
|---|
| 107 | File "/Users/thomas/dev/migrations_dj/venv/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
|
|---|
| 108 | _mysql.connection.query(self, query)
|
|---|
| 109 | django.db.utils.OperationalError: (1553, "Cannot drop index 'mysite_mymodelb_a_id_b53c781c93aab9a_uniq': needed in a foreign key constraint")
|
|---|