Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration fails #765

Closed
flekschas opened this issue Nov 3, 2015 · 3 comments
Closed

Migration fails #765

flekschas opened this issue Nov 3, 2015 · 3 comments
Assignees
Milestone

Comments

@flekschas
Copy link
Member

I've tried to update my develop branch (was about a week old) using fab vm update and ran unto the following error:

[vagrant@127.0.0.1:2222] out: Error in migration: file_store:0005_auto__add_field_filestoreitem_filetype
[vagrant@127.0.0.1:2222] out: IntegrityError: insert or update on table "file_store_filestoreitem" violates foreign key constraint "filetype_id_refs_id_77b79973bce037d0"
[vagrant@127.0.0.1:2222] out: DETAIL:  Key (filetype_id)=(33) is not present in table "file_store_filetype".
@flekschas
Copy link
Member Author

This solved the issue:

./manage.py loaddata file_store/fixtures/initial_data.json

scottx611x added a commit that referenced this issue Nov 3, 2015
…_data.json` command immediately after the FileType Model is created, alleviating the issue seen in #765
scottx611x added a commit that referenced this issue Nov 3, 2015
…/initial_data.json` command immediately after the FileType Model is created, alleviating the issue seen in #765"

This reverts commit 2e3b921.
@ngehlenborg ngehlenborg reopened this Nov 27, 2015
@ngehlenborg
Copy link
Contributor

I am just trying to update my VM (which had not seen any updates in about a month) and I am running into this exact problem in 5a5580b. I was able to resolve the issue by applying the fix suggested by @flekschas above but this should be automated/fixed in the deployment.

@scottx611x scottx611x modified the milestones: Kingston, Hadley Nov 30, 2015
@scottx611x
Copy link
Member

Closed as a non-issue.
A developer starting with a clean instance will not run into this issue.
This issue only occurs in one-off cases so providing the command: ./manage.py loaddata file_store/fixtures/initial_data.json to alleviate any occurrences of this is sufficient.

scottx611x added a commit that referenced this issue Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants