Class: CreateSchedule

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/agendare/install/templates/create_schedule.rb

Instance Method Summary collapse

Instance Method Details

#downObject



17
18
19
# File 'lib/generators/agendare/install/templates/create_schedule.rb', line 17

def down
  drop_table :schedules
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/agendare/install/templates/create_schedule.rb', line 2

def up
  create_table :schedules do |t|
    t.integer  :scheduled_id
    t.integer  :user_id
    t.date     :date
    t.time     :time
    t.text     :description
    
    t.timestamps
    
    t.references :scheduled
    t.references :user
  end
end