{"action":"created","issue":{"url":"https://api.github.com/repos/allegro/ralph/issues/2769","repository_url":"https://api.github.com/repos/allegro/ralph","labels_url":"https://api.github.com/repos/allegro/ralph/issues/2769/labels{/name}","comments_url":"https://api.github.com/repos/allegro/ralph/issues/2769/comments","events_url":"https://api.github.com/repos/allegro/ralph/issues/2769/events","html_url":"https://github.com/allegro/ralph/issues/2769","id":173201315,"number":2769,"title":"ralph migrate issues --> Can't install!","user":{"login":"yanfosec","id":5740992,"avatar_url":"https://avatars.githubusercontent.com/u/5740992?v=3","gravatar_id":"","url":"https://api.github.com/users/yanfosec","html_url":"https://github.com/yanfosec","followers_url":"https://api.github.com/users/yanfosec/followers","following_url":"https://api.github.com/users/yanfosec/following{/other_user}","gists_url":"https://api.github.com/users/yanfosec/gists{/gist_id}","starred_url":"https://api.github.com/users/yanfosec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanfosec/subscriptions","organizations_url":"https://api.github.com/users/yanfosec/orgs","repos_url":"https://api.github.com/users/yanfosec/repos","events_url":"https://api.github.com/users/yanfosec/events{/privacy}","received_events_url":"https://api.github.com/users/yanfosec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-25T13:21:04Z","updated_at":"2016-09-06T14:06:48Z","closed_at":null,"body":"Just installed 3.0.0-snapshot-20160824-6995, and can't seem to run ralph migrate:\r\n```\r\nOperations to perform:\r\n  Synchronize unmigrated apps: import_export, rest_framework, mptt, staticfiles, taggit_serializer, messages, humanize, ralph_admin, django_rq, table, dc_view, foundation, ralph2_sync, permissions\r\n  Apply all migrations: accounts, external_services, assets, data_importer, authtoken, deployment, dhcp, licences, security, auth, custom_fields, admin, data_center, taggit, dashboards, transitions, sessions, attachments, operations, reversion, sitetree, back_office, reports, supports, domains, virtual, networks, contenttypes\r\nSynchronizing apps without migrations:\r\n  Creating tables...\r\n    Running deferred SQL...\r\n  Installing custom SQL...\r\nRunning migrations:\r\n  Rendering model states... DONE\r\n  Applying contenttypes.0001_initial... OK\r\n  Applying contenttypes.0002_remove_content_type_name... OK\r\n  Applying auth.0001_initial... OK\r\n  Applying auth.0002_alter_permission_name_max_length... OK\r\n  Applying auth.0003_alter_user_email_max_length... OK\r\n  Applying auth.0004_alter_user_username_opts... OK\r\n  Applying auth.0005_alter_user_last_login_null... OK\r\n  Applying auth.0006_require_contenttypes_0002... OK\r\n  Applying accounts.0001_initial... OK\r\n  Applying accounts.0002_auto_20151204_0758... OK\r\n  Applying accounts.0003_region_country... OK\r\n  Applying accounts.0004_region_stocktaking_enabled... OK\r\n  Applying admin.0001_initial... OK\r\n  Applying data_importer.0001_initial... OK\r\n  Applying data_importer.0002_auto_20151125_1354... OK\r\n  Applying data_importer.0003_auto_20160624_1217... OK\r\n  Applying data_importer.0004_auto_20160728_1046... OK\r\n  Applying taggit.0001_initial... OK\r\n  Applying taggit.0002_auto_20150616_2121... OK\r\n  Applying assets.0001_initial... OK\r\n  Applying assets.0002_auto_20151125_1354... OK\r\n  Applying assets.0003_auto_20151126_2205... OK\r\n  Applying assets.0004_auto_20151204_0758... OK\r\n  Applying assets.0005_category_depreciation_rate... OK\r\n  Applying assets.0006_category_show_buyout_date... OK\r\n  Applying assets.0007_auto_20160122_1022... OK\r\n  Applying assets.0008_auto_20160122_1429... OK\r\n  Applying assets.0009_auto_20160307_1138... OK\r\n  Applying assets.0010_auto_20160405_1531... OK\r\n  Applying assets.0011_auto_20160603_0742... OK\r\n  Applying assets.0012_auto_20160606_1409... OK\r\n  Applying assets.0013_auto_20160615_2140... OK\r\n  Applying assets.0014_memory... OK\r\n  Applying assets.0015_auto_20160701_0952... OK\r\n  Applying assets.0016_fibrechannelcard... OK\r\n  Applying assets.0017_processor... OK\r\n  Applying assets.0018_disk... OK\r\n  Applying assets.0019_auto_20160719_1443... OK\r\n  Applying assets.0020_auto_20160803_0712...Traceback (most recent call last):\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py\", line 124, in execute\r\n    return self.cursor.execute(query, args)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 220, in execute\r\n    self.errorhandler(self, exc, value)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py\", line 36, in defaulterrorhandler\r\n    raise errorvalue\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 209, in execute\r\n    r = self._query(query)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 371, in _query\r\n    rowcount = self._do_query(q)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 335, in _do_query\r\n    db.query(q)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py\", line 280, in query\r\n    _mysql.connection.query(self, query)\r\n_mysql_exceptions.OperationalError: (1025, \"Error on rename of './ralph/#sql-220b_8c' to './ralph/assets_configurationclass' (errno: 150)\")\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"/opt/ralph/ralph-core/bin/ralph\", line 9, in <module>\r\n    load_entry_point('ralph==3.0.0', 'console_scripts', 'ralph')()\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/__main__.py\", line 29, in prod\r\n    main('ralph.settings.prod')\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/__main__.py\", line 14, in main\r\n    execute_from_command_line(sys.argv)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/__init__.py\", line 354, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/__init__.py\", line 346, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/base.py\", line 394, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/base.py\", line 445, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/commands/migrate.py\", line 222, in handle\r\n    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/executor.py\", line 110, in migrate\r\n    self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/executor.py\", line 148, in apply_migration\r\n    state = migration.apply(state, schema_editor)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/migration.py\", line 115, in apply\r\n    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/operations/special.py\", line 43, in database_forwards\r\n    database_operation.database_forwards(app_label, schema_editor, from_state, to_state)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/operations/fields.py\", line 275, in database_forwards\r\n    to_model._meta.get_field(self.new_name),\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/base/schema.py\", line 484, in alter_field\r\n    old_db_params, new_db_params, strict)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/base/schema.py\", line 547, in _alter_field\r\n    self.execute(self._rename_field_sql(model._meta.db_table, old_field, new_field, new_type))\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/base/schema.py\", line 111, in execute\r\n    cursor.execute(sql, params)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/utils.py\", line 98, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/utils/six.py\", line 685, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py\", line 124, in execute\r\n    return self.cursor.execute(query, args)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 220, in execute\r\n    self.errorhandler(self, exc, value)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py\", line 36, in defaulterrorhandler\r\n    raise errorvalue\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 209, in execute\r\n    r = self._query(query)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 371, in _query\r\n    rowcount = self._do_query(q)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py\", line 335, in _do_query\r\n    db.query(q)\r\n  File \"/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py\", line 280, in query\r\n    _mysql.connection.query(self, query)\r\ndjango.db.utils.OperationalError: (1025, \"Error on rename of './ralph/#sql-220b_8c' to './ralph/assets_configurationclass' (errno: 150)\")\r\n```"},"comment":{"url":"https://api.github.com/repos/allegro/ralph/issues/comments/244960967","html_url":"https://github.com/allegro/ralph/issues/2769#issuecomment-244960967","issue_url":"https://api.github.com/repos/allegro/ralph/issues/2769","id":244960967,"user":{"login":"vi4m","id":552398,"avatar_url":"https://avatars.githubusercontent.com/u/552398?v=3","gravatar_id":"","url":"https://api.github.com/users/vi4m","html_url":"https://github.com/vi4m","followers_url":"https://api.github.com/users/vi4m/followers","following_url":"https://api.github.com/users/vi4m/following{/other_user}","gists_url":"https://api.github.com/users/vi4m/gists{/gist_id}","starred_url":"https://api.github.com/users/vi4m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vi4m/subscriptions","organizations_url":"https://api.github.com/users/vi4m/orgs","repos_url":"https://api.github.com/users/vi4m/repos","events_url":"https://api.github.com/users/vi4m/events{/privacy}","received_events_url":"https://api.github.com/users/vi4m/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T14:06:47Z","updated_at":"2016-09-06T14:06:47Z","body":"@LordMrcS have you stopped ralph instance before applying migration?"}}
{"actor":{"display_login":"vi4m"}}