Skip to content

Fatal Error when migrating database #18

Closed
JeffHeard opened this Issue Mar 14, 2014 · 4 comments

3 participants

@JeffHeard

See more: http://www.pivotaltracker.com/story/show/67584796

Requested by: Tony Castronova

following Jeff Heard's seminar (and the wiki doc) for extending HydroShare. A fatal error occurs when executing:

python manage.py migrate hs.SOME_APP_NAME

FATAL ERROR - The following SQL query failed: CREATE TABLE "hs_core_genericresource" ("page_ptr_id" integer NOT NULL PRIMARY KEY, "content" text NOT NULL, "user_id" integer NOT NULL, "creator_id" integer NOT NULL, "public" boolean NOT NULL, "frozen" boolean NOT NULL, "do_not_distribute" boolean NOT NULL, "discoverable" boolean NOT NULL, "published_and_frozen" boolean NOT NULL, "last_changed_by_id" integer NULL, "resource_file" varchar(100) NULL, "resource_url" varchar(200) NULL)
The error was: relation "hs_core_genericresource" already exists

@JeffHeard JeffHeard self-assigned this Mar 14, 2014
@valentinedwv
HydroShare member

If you don't remove the initial migration, code, you will see this.

@pkdash
HydroShare member
pkdash commented Mar 15, 2014

How do I remove the initial migration code?

@valentinedwv
HydroShare member
@pkdash
HydroShare member
pkdash commented Mar 16, 2014

When I cloned the hs_app_template it came with the 'migrations' folder which I had to delete before running the manage.py for migration of my app to avoid this error.

@JeffHeard JeffHeard closed this Jul 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.