class CreateUsers < ActiveRecord::Migration class User < ActiveRecord::Base; end def self.up create_table :users do |t| t.string :account t.string :name t.string :hashed_password t.string :salt t.timestamps end add_index :users, :account, :unique => true User.create(:account => 'test', :name => '[Built-in]Masaki Ozawa') end def self.down drop_table :users end end