python manage py migrate home pilgrim venv venv-gallup local lib pytho

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$ python manage.py migrate
/home/pilgrim/venv/venv-gallup/local/lib/python2.7/site-packages/sorl/thumbnail/helpers.py:5: DeprecationWarning: django.utils.simplejson is deprecated; use json instead.
from django.utils import simplejson
Running migrations for action_user:
- Nothing to migrate.
- Loading initial data for action_user.
Installed 0 object(s) from 0 fixture(s)
Running migrations for helpers:
- Nothing to migrate.
- Loading initial data for helpers.
Installed 0 object(s) from 0 fixture(s)
Running migrations for gallup:
- Migrating forwards to 0003_auto__del_opros__add_survey__chg_field_answer_opros.
> gallup:0003_auto__del_opros__add_survey__chg_field_answer_opros
FATAL ERROR - The following SQL query failed: ALTER TABLE "gallup_answer" ADD CONSTRAINT "opros_id_refs_id_647d7a4b" FOREIGN KEY ("opros_id") REFERENCES "action_hierarchy_opros" ("id") DEFERRABLE INITIALLY DEFERRED;
The error was: insert or update on table "gallup_answer" violates foreign key constraint "opros_id_refs_id_647d7a4b"
DETAIL: Key (opros_id)=(1) is not present in table "action_hierarchy_opros".
Error in migration: gallup:0003_auto__del_opros__add_survey__chg_field_answer_opros
The following content types are stale and need to be deleted:
gallup | opros
Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.