Class: MigrateDevapeCalendar

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/devape_calendar/templates/migration.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/rails/generators/devape_calendar/templates/migration.rb', line 13

def self.down
  drop_table :calendars
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/rails/generators/devape_calendar/templates/migration.rb', line 2

def self.up
  create_table :calendars do |t|
    t.integer :event_id
    t.integer :user_id
    t.string :title
    t.datetime :start
    t.datetime :end
    t.timestamps
  end
end