| | 54 | $ python manage.py migrate foo zero |
| | 55 | Operations to perform: |
| | 56 | Unapply all migrations: foo |
| | 57 | Running migrations: |
| | 58 | Rendering model states... DONE |
| | 59 | Unapplying foo.0002_auto_20170123_1212...Traceback (most recent call last): |
| | 60 | File "manage.py", line 10, in <module> |
| | 61 | execute_from_command_line(sys.argv) |
| | 62 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line |
| | 63 | utility.execute() |
| | 64 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute |
| | 65 | self.fetch_command(subcommand).run_from_argv(self.argv) |
| | 66 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv |
| | 67 | self.execute(*args, **cmd_options) |
| | 68 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute |
| | 69 | output = self.handle(*args, **options) |
| | 70 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle |
| | 71 | fake_initial=fake_initial, |
| | 72 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/migrations/executor.py", line 119, in migrate |
| | 73 | state = self._migrate_all_backwards(plan, full_plan, fake=fake) |
| | 74 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/migrations/executor.py", line 194, in _migrate_all_backwards |
| | 75 | self.unapply_migration(states[migration], migration, fake=fake) |
| | 76 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/migrations/executor.py", line 264, in unapply_migration |
| | 77 | state = migration.unapply(state, schema_editor) |
| | 78 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/migrations/migration.py", line 178, in unapply |
| | 79 | operation.database_backwards(self.app_label, schema_editor, from_state, to_state) |
| | 80 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 153, in database_backwards |
| | 81 | schema_editor.add_field(from_model, to_model._meta.get_field(self.name)) |
| | 82 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/postgresql/schema.py", line 21, in add_field |
| | 83 | super(DatabaseSchemaEditor, self).add_field(model, field) |
| | 84 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 409, in add_field |
| | 85 | self.execute(sql, params) |
| | 86 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 112, in execute |
| | 87 | cursor.execute(sql, params) |
| | 88 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute |
| | 89 | return super(CursorDebugWrapper, self).execute(sql, params) |
| | 90 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute |
| | 91 | return self.cursor.execute(sql, params) |
| | 92 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__ |
| | 93 | six.reraise(dj_exc_type, dj_exc_value, traceback) |
| | 94 | File "/Users/alexei/.virtualenvs/djbug/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute |
| | 95 | return self.cursor.execute(sql, params) |