discourse/db/migrate/20140905171733_create_warnings.rb
Robin Ward 334e21a03a Revert "Revert "FEATURE: Can create warnings for users via PM""
This reverts commit 1c7559380c145136726028ae9f2aeea6f351eb78.
2014-09-08 11:11:56 -04:00

13 lines
335 B
Ruby

class CreateWarnings < ActiveRecord::Migration
def change
create_table :warnings do |t|
t.references :topic, null: false
t.references :user, null: false
t.integer :created_by_id, null: false
t.timestamps
end
add_index :warnings, :user_id
add_index :warnings, :topic_id, unique: true
end
end