class CreateHomeworkDetailGroups < ActiveRecord::Migration
  def change
    create_table :homework_detail_groups do |t|
      t.integer :homework_common_id
      t.integer :min_num
      t.integer :max_num
      t.integer :base_on_project
      t.references :homework_common

      t.timestamps
    end
    add_index :homework_detail_groups, :homework_common_id
  end
end