0
votes

So this is probably pretty easy. I'm not finding anything in RubyMine documentation or Google. I previously generated a migration as:

Proposal name:string date:date title:string text:text user:references

After wanting to make a change I went through and deleted everything, or so I thought out of my rails project. This is what I get when I attempt re-generate and run db:migrate

SQLite3::SQLException: table "proposals" already exists: CREATE TABLE "proposals" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "date" date, "title" varchar(255), "text" text, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)

So where else do I have to go to delete my table?

2

2 Answers

1
votes

Ruby mine I'm not sure, but If you want to roll back the latest migration its

in your console

rake db:rollback

if you want to revert the previous generator action Ex:

rails g scaffold User name:string

and you want to revert all of the code generated

rails destroy scaffold User

HTH

1
votes

See This

http://guides.rubyonrails.org/migrations.html

And try in your terminal - rake db:rollback