我想添加一个新列:
class AddNameToUsers < ActiveRecord::Migration
def change
add_column :users, :name, :string, :first => true
end
end
:first
我包含了将列放在所有其他列之前的论点。但似乎没有用:
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "name"
end
难道我做错了什么?