I am setting this up, in this way, so that we have some extensibility. We may wish to have some sort of a polymorphic association where multiple models need to have a scheduling model available to them. That being said, as of right now, only the pto model needs it so I am doing a belong_to and has_one association between the two
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class CreateSchedules < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :schedules do |t|
|
||||
t.string :event_type
|
||||
t.date :date_begin
|
||||
t.date :date_end
|
||||
t.string :event_name
|
||||
t.string :event_desc
|
||||
t.integer :user_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user