#23565: Unexpected Migration Crash
----------------------------------+--------------------------------------
     Reporter:  narrowfail        |                    Owner:  nobody
         Type:  Uncategorized     |                   Status:  closed
    Component:  Migrations        |                  Version:  1.7
     Severity:  Normal            |               Resolution:  invalid
     Keywords:  migration, crash  |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Description changed by narrowfail:

Old description:

> Here is what happened:
>

> {{{
> Operations to perform:
>   Apply all migrations: history
> Running migrations:
>   Applying history.0002_employeehitmodel...Traceback (most recent call
> last):
>   File "./manage.py", line 10, in <module>
>     execute_from_command_line(sys.argv)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/__init__.py", line 385, in
> execute_from_command_line
>     utility.execute()
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/__init__.py", line 377, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/base.py", line 288, in run_from_argv
>     self.execute(*args, **options.__dict__)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/base.py", line 338, in execute
>     output = self.handle(*args, **options)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/commands/migrate.py", line 160, in handle
>     executor.migrate(targets, plan, fake=options.get("fake", False))
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/executor.py", line 63, in migrate
>     self.apply_migration(migration, fake=fake)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/executor.py", line 97, in apply_migration
>     migration.apply(project_state, schema_editor)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/schema.py", line 82, in __exit__
>     self.execute(sql)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/schema.py", line 98, in execute
>     cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/utils.py", line 65, in execute
>     return self.cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/mysql/base.py", line 128, in execute
>     return self.cursor.execute(query, args)
>   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174,
> in execute
>     self.errorhandler(self, exc, value)
>   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
> 36, in defaulterrorhandler
>     raise errorclass, errorvalue
> django.db.utils.OperationalError: (1005, "Can't create table 'munibase
> .#sql-3c75_11a6a' (errno: 150)")
> digitalice@munibase:/srv/bondfaces/bondfaces$ ./manage.py migrate history
> Operations to perform:
>   Apply all migrations: history
> Running migrations:
>   Applying history.0002_employeehitmodel...Traceback (most recent call
> last):
>   File "./manage.py", line 10, in <module>
>     execute_from_command_line(sys.argv)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/__init__.py", line 385, in
> execute_from_command_line
>     utility.execute()
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/__init__.py", line 377, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/base.py", line 288, in run_from_argv
>     self.execute(*args, **options.__dict__)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/base.py", line 338, in execute
>     output = self.handle(*args, **options)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/management/commands/migrate.py", line 160, in handle
>     executor.migrate(targets, plan, fake=options.get("fake", False))
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/executor.py", line 63, in migrate
>     self.apply_migration(migration, fake=fake)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/executor.py", line 97, in apply_migration
>     migration.apply(project_state, schema_editor)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/migration.py", line 107, in apply
>     operation.database_forwards(self.app_label, schema_editor,
> project_state, new_state)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/migrations/operations/models.py", line 36, in
> database_forwards
>     schema_editor.create_model(model)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/schema.py", line 270, in create_model
>     self.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/schema.py", line 98, in execute
>     cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/utils.py", line 65, in execute
>     return self.cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line
> 94, in __exit__
>     six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/utils.py", line 65, in execute
>     return self.cursor.execute(sql, params)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/db/backends/mysql/base.py", line 128, in execute
>     return self.cursor.execute(query, args)
>   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174,
> in execute
>     self.errorhandler(self, exc, value)
>   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
> 36, in defaulterrorhandler
>     raise errorclass, errorvalue
> django.db.utils.OperationalError: (1050, "Table
> 'history_employeehitmodel' already exists")
> }}}

New description:

 Here is what happened:

 {{{
 Operations to perform:
   Apply all migrations: history
 Running migrations:
   Applying history.0002_employeehitmodel...Traceback (most recent call
 last):
   File "./manage.py", line 10, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 385, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 377, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 288, in run_from_argv
     self.execute(*args, **options.__dict__)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 338, in execute
     output = self.handle(*args, **options)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/commands/migrate.py", line 160, in handle
     executor.migrate(targets, plan, fake=options.get("fake", False))
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/executor.py", line 63, in migrate
     self.apply_migration(migration, fake=fake)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/executor.py", line 97, in apply_migration
     migration.apply(project_state, schema_editor)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/schema.py", line 82, in __exit__
     self.execute(sql)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/schema.py", line 98, in execute
     cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/utils.py", line 65, in execute
     return self.cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/mysql/base.py", line 128, in execute
     return self.cursor.execute(query, args)
   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in
 execute
     self.errorhandler(self, exc, value)
   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36,
 in defaulterrorhandler
     raise errorclass, errorvalue
 django.db.utils.OperationalError: (1005, "Can't create table 'website
 .#sql-3c75_11a6a' (errno: 150)")
 digitalice@website:/srv/site/site$ ./manage.py migrate history
 Operations to perform:
   Apply all migrations: history
 Running migrations:
   Applying history.0002_employeehitmodel...Traceback (most recent call
 last):
   File "./manage.py", line 10, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 385, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 377, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 288, in run_from_argv
     self.execute(*args, **options.__dict__)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/base.py", line 338, in execute
     output = self.handle(*args, **options)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/management/commands/migrate.py", line 160, in handle
     executor.migrate(targets, plan, fake=options.get("fake", False))
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/executor.py", line 63, in migrate
     self.apply_migration(migration, fake=fake)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/executor.py", line 97, in apply_migration
     migration.apply(project_state, schema_editor)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/migration.py", line 107, in apply
     operation.database_forwards(self.app_label, schema_editor,
 project_state, new_state)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/migrations/operations/models.py", line 36, in
 database_forwards
     schema_editor.create_model(model)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/schema.py", line 270, in create_model
     self.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/schema.py", line 98, in execute
     cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/utils.py", line 65, in execute
     return self.cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line
 94, in __exit__
     six.reraise(dj_exc_type, dj_exc_value, traceback)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/utils.py", line 65, in execute
     return self.cursor.execute(sql, params)
   File "/usr/local/lib/python2.7/dist-
 packages/django/db/backends/mysql/base.py", line 128, in execute
     return self.cursor.execute(query, args)
   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in
 execute
     self.errorhandler(self, exc, value)
   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36,
 in defaulterrorhandler
     raise errorclass, errorvalue
 django.db.utils.OperationalError: (1050, "Table 'history_employeehitmodel'
 already exists")
 }}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23565#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.2f01be9e935e45ae6b7ad227067c6bf7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to