Class: EventDb::CreateDb

Inherits:
Object
  • Object
show all
Defined in:
lib/eventdb/schema.rb

Instance Method Summary collapse

Instance Method Details

#upObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/eventdb/schema.rb', line 6

def up
  ActiveRecord::Schema.define do

create_table :events do |t|
  t.string  :title,      null: false   ##  title (just the first link text)
  t.string  :link        ## for now optional - why? why not??
  t.string  :place,      null: false
  t.date    :start_date, null: false   ## use (rename) to start_at - why? why not?
  t.date    :end_date,   null: false   ## use (rename) to end_at   - why? why not?
  t.integer :days,       null: false

  t.timestamps
end

  end  # Schema.define
end