final/db/migrate/20151204093210_create_users.rb

17 lines
373 B
Ruby
Raw Normal View History

2015-12-07 04:43:35 +08:00
#encoding: utf-8
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :username
t.string :password_digest
t.string :email
t.boolean :admin
t.datetime :last_login_time
t.datetime :last_reply_time
t.timestamps
end
add_index :users, :username
add_index :users, :email
end
end