osem-fcy/db/migrate/20160704091928_create_schedules.rb
Ana beb17165a2 Introduce an association for the selected_schedule
Association in Program fot the selected_schedule
2016-08-11 15:11:27 +02:00

9 lines
247 B
Ruby

class CreateSchedules < ActiveRecord::Migration
def change
create_table :schedules do |t|
t.belongs_to :program, index: true
t.timestamps null: false
end
add_reference :programs, :selected_schedule, index: true
end
end