socialforge/db/migrate/20161221060853_create_conte...

18 lines
449 B
Ruby

class CreateContestMessages < ActiveRecord::Migration
def change
create_table :contest_messages do |t|
t.references :user
t.references :contest
t.integer :contest_message_id
t.string :contest_message_type
t.boolean :viewed, :default => false
t.text :content
t.integer :status
t.timestamps
end
add_index :contest_messages, :user_id
add_index :contest_messages, :contest_id
end
end