rake db:migrate giving error in second time #291

Closed
rajputvai opened this Issue Sep 26, 2012 · 6 comments

Projects

None yet

3 participants

@rajputvai

I have install blog engine to refienrycms and which is working perfectly, i have run all those require tasks, now i have generated migration with some of the table fields changes(of course not refinerycms or blog tables) then i m getting error. the output of the rake db:migrate is as below

== CreateBlogStructure: migrating ============================================
-- create_table("refinery_blog_posts", {:id=>true})
NOTICE: CREATE TABLE will create implicit sequence "refinery_blog_posts_id_seq1" for serial column "refinery_blog_posts.id"
rake aborted!
An error has occurred, this and all later migrations canceled:

PG::Error: ERROR: relation "refinery_blog_posts" already exists
: CREATE TABLE "refinery_blog_posts" ("id" serial primary key, "title" character varying(255), "body" text, "draft" boolean, "published_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

@ugisozols
Member

For some unknown reason it thinks CreateBlogStructure migration hasn't been run (its number is probably missing from schema_migrations table).

Can you give us a bit more specific steps to reproduce?

@rajputvai

So my schema.rb file does not contains refienrycms-blog tables. it has others table n refinerycms table. Can you please elaborate what you want to know? so you can reproduce it easily... lastly rake db:migrate i did is after adding gem refinerycms-blog then i added some migration to add some fields in other table then again i did rake db:migrate it gave me mentioned error...

@parndt
Member
parndt commented Sep 26, 2012

Can you list the steps you used to install the blog?
It should be:

  • add the gem to Gemfile
  • bundle
  • rails generate refinery:blog
  • rake db:migrate
  • rake db:seed

Any difference?

@rajputvai

yeah parndt, i have followed exactly the same steps.

@ugisozols
Member

@rajputvai sorry for responding so late but did you got around this issue?

@ugisozols
Member

Closing due to inactivity.

@ugisozols ugisozols closed this Dec 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment