socialforge/db/migrate/20160429015956_create_apply...

14 lines
323 B
Ruby
Raw Normal View History

class CreateApplyHomeworks < ActiveRecord::Migration
def change
create_table :apply_homeworks do |t|
t.integer :status
t.references :user
t.references :homework_common
t.timestamps
end
add_index :apply_homeworks, :user_id
add_index :apply_homeworks, :homework_common_id
end
end