{"action":"created","issue":{"url":"https://api.github.com/repos/phageParser/phageParser/issues/138","repository_url":"https://api.github.com/repos/phageParser/phageParser","labels_url":"https://api.github.com/repos/phageParser/phageParser/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/phageParser/phageParser/issues/138/comments","events_url":"https://api.github.com/repos/phageParser/phageParser/issues/138/events","html_url":"https://github.com/phageParser/phageParser/issues/138","id":221562277,"number":138,"title":"Data type mismatch when running database migrations","user":{"login":"mbonsma","id":5651370,"avatar_url":"https://avatars1.githubusercontent.com/u/5651370?v=3","gravatar_id":"","url":"https://api.github.com/users/mbonsma","html_url":"https://github.com/mbonsma","followers_url":"https://api.github.com/users/mbonsma/followers","following_url":"https://api.github.com/users/mbonsma/following{/other_user}","gists_url":"https://api.github.com/users/mbonsma/gists{/gist_id}","starred_url":"https://api.github.com/users/mbonsma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbonsma/subscriptions","organizations_url":"https://api.github.com/users/mbonsma/orgs","repos_url":"https://api.github.com/users/mbonsma/repos","events_url":"https://api.github.com/users/mbonsma/events{/privacy}","received_events_url":"https://api.github.com/users/mbonsma/received_events","type":"User","site_admin":false},"labels":[{"id":123331020,"url":"https://api.github.com/repos/phageParser/phageParser/labels/bug","name":"bug","color":"fc2929","default":true},{"id":341434816,"url":"https://api.github.com/repos/phageParser/phageParser/labels/code","name":"code","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-13T13:24:37Z","updated_at":"2017-06-12T07:56:42Z","closed_at":"2017-05-03T20:31:52Z","body":"When running `python manage.py makemigrations` followed by `python manage.py migrate`, I get this error: `django.db.utils.IntegrityError: datatype mismatch`. I cloned a fresh copy and still get the error. This is the exact sequence I did if anyone wants to reproduce it. Anyone know why this is happening, or if it's a problem just on my end?\r\n\r\n```\r\ngit clone git@github.com:phageParser/phageParser.git phageParsertest\r\ncd phageParsertest/phageAPI\r\ngit checkout django-dev\r\npython manage.py makemigrations\r\npython manage.py migrate # this is where the error happens\r\n```\r\n\r\nThis is the full error message:\r\n\r\n```\r\n  Applying restapi.0002_auto_20170413_1317...Traceback (most recent call last):\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py\", line 337, in execute\r\n    return Database.Cursor.execute(self, query, params)\r\nsqlite3.IntegrityError: datatype mismatch\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 \"manage.py\", line 22, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/core/management/__init__.py\", line 367, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/core/management/__init__.py\", line 359, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/core/management/base.py\", line 294, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/core/management/base.py\", line 345, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/core/management/commands/migrate.py\", line 204, in handle\r\n    fake_initial=fake_initial,\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/migrations/executor.py\", line 115, in migrate\r\n    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/migrations/executor.py\", line 145, in _migrate_all_forwards\r\n    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/migrations/executor.py\", line 244, in apply_migration\r\n    state = migration.apply(state, schema_editor)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/migrations/migration.py\", line 129, in apply\r\n    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/migrations/operations/fields.py\", line 204, in database_forwards\r\n    schema_editor.alter_field(from_model, from_field, to_field)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/base/schema.py\", line 495, in alter_field\r\n    old_db_params, new_db_params, strict)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/sqlite3/schema.py\", line 255, in _alter_field\r\n    self._remake_table(model, alter_fields=[(old_field, new_field)])\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/sqlite3/schema.py\", line 199, in _remake_table\r\n    self.quote_name(model._meta.db_table),\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/base/schema.py\", line 112, in execute\r\n    cursor.execute(sql, params)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/utils.py\", line 79, in execute\r\n    return super(CursorDebugWrapper, self).execute(sql, params)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/utils.py\", line 94, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/utils/six.py\", line 685, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/utils.py\", line 64, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/home/madeleine/anaconda2/envs/django/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py\", line 337, in execute\r\n    return Database.Cursor.execute(self, query, params)\r\ndjango.db.utils.IntegrityError: datatype mismatch\r\n```"},"comment":{"url":"https://api.github.com/repos/phageParser/phageParser/issues/comments/307716473","html_url":"https://github.com/phageParser/phageParser/issues/138#issuecomment-307716473","issue_url":"https://api.github.com/repos/phageParser/phageParser/issues/138","id":307716473,"user":{"login":"danielliekal","id":6703704,"avatar_url":"https://avatars3.githubusercontent.com/u/6703704?v=3","gravatar_id":"","url":"https://api.github.com/users/danielliekal","html_url":"https://github.com/danielliekal","followers_url":"https://api.github.com/users/danielliekal/followers","following_url":"https://api.github.com/users/danielliekal/following{/other_user}","gists_url":"https://api.github.com/users/danielliekal/gists{/gist_id}","starred_url":"https://api.github.com/users/danielliekal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielliekal/subscriptions","organizations_url":"https://api.github.com/users/danielliekal/orgs","repos_url":"https://api.github.com/users/danielliekal/repos","events_url":"https://api.github.com/users/danielliekal/events{/privacy}","received_events_url":"https://api.github.com/users/danielliekal/received_events","type":"User","site_admin":false},"created_at":"2017-06-12T07:56:42Z","updated_at":"2017-06-12T07:56:42Z","body":"Running python manage.py flush as suggested above worked for me."}}
{"actor":{"display_login":"danielliekal"}}