2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2013-01-07 09:04:09 +01:00
|
|
|
class CreateEventAttachmentsTable < ActiveRecord::Migration
|
|
|
|
|
def up
|
|
|
|
|
create_table :event_attachments do |t|
|
|
|
|
|
t.references :event
|
2014-07-21 14:49:05 +02:00
|
|
|
t.string :title, null: false
|
2013-01-07 09:04:09 +01:00
|
|
|
t.string :attachment_file_name
|
|
|
|
|
t.string :attachment_content_type
|
|
|
|
|
t.integer :attachment_file_size
|
|
|
|
|
t.datetime :attachment_updated_at
|
2014-07-21 14:49:05 +02:00
|
|
|
t.boolean :public, default: true
|
2013-01-07 09:04:09 +01:00
|
|
|
t.timestamps
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def down
|
|
|
|
|
drop_table :event_attachments
|
|
|
|
|
end
|
|
|
|
|
end
|