0
我是RoR的初學者,只需在Lynda上按照「Ruby on Rails 3基本培訓與凱文Skoglund」。rake db:migrate在我的桌面上顯示沒有變化
由於一些錯字,所以我被困住了,我把桌子放到原來的狀態。 但是我做完了之後,我無法再改變我的桌子了。無論嘗試使用rake db:migrate version = 0還是rake db:migrate,終端都不會顯示任何錯誤標誌。
以下是我的代碼遷移
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 2013-02-13 21:54:16