Class: CreateSchedules
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateSchedules
- Defined in:
- lib/generators/schedulable/templates/migrations/create_schedules.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
22 23 24 |
# File 'lib/generators/schedulable/templates/migrations/create_schedules.rb', line 22 def self.down drop_table :schedules end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/schedulable/templates/migrations/create_schedules.rb', line 2 def self.up create_table :schedules do |t| t.references :schedulable, polymorphic: true t.date :date t.time :time t.string :rule t.string :interval t.text :days t.text :day_of_week t.date :until t.integer :count t. end end |