socialforge/db/migrate/20161221060853_create_conte...

18 lines
449 B
Ruby
Raw Normal View History

2016-12-22 10:01:37 +08:00
class CreateContestMessages < ActiveRecord::Migration
def change
create_table :contest_messages do |t|
t.references :user
t.references :contest
t.integer :contest_message_id
2016-12-22 17:13:10 +08:00
t.string :contest_message_type
2016-12-22 10:01:37 +08:00
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