class CreateContestantWorks < ActiveRecord::Migration def change create_table :contestant_works do |t| t.string :name t.text :description t.references :work t.references :user t.float :work_score t.references :project t.integer :work_status t.timestamp :commit_time t.boolean :is_delete, :default => false t.timestamps end add_index :contestant_works, :work_id add_index :contestant_works, :user_id add_index :contestant_works, :project_id end end