0

I am the beginner of RoR and just follow the "Ruby on Rails 3 Essential Training with Kevin Skoglund" on Lynda.

Because of some typo so I got stucked and I drop the table to the original state. But after I did it, I can not change my tables any more. NO matter trying rake db:migrate version=0 or rake db:migrate , the terminal shows nothing with no any error sign.

Following are my migrate codes

 class CreateSections < ActiveRecord::Migration
  def self.up
   create_table :sections do |t|
    t.integer "pages_id"    
    t.string "name" 
    t.integer "position"
    t.boolean "visible" , :default => false
    t.string "content_type"
    t.string "content"
    t.timestamps
  end
 add_index("sections", "pages_id")

 end

def self.down
drop_table :sections

 end
end
Iseng
  • 17
  • 4

1 Answers1

0

You could just drop and recreate the database, using:

rake db:reset
rake db:migrate

or

rake db:drop
rake db:create
rake db:migrate
Bassam Mehanni
  • 14,796
  • 2
  • 33
  • 41