class AddNewColumnToCourse < ActiveRecord::Migration[5.2] def change add_column :courses, :start_date, :date add_column :courses, :subject_id, :integer, default: 0 add_index :courses, :subject_id end end