diaspora/db/migrate/20110209204702_create_mentions.rb
2011-02-09 16:07:25 -08:00

15 lines
380 B
Ruby

class CreateMentions < ActiveRecord::Migration
def self.up
create_table :mentions do |t|
t.integer :post_id, :null => false
t.integer :person_id, :null => false
end
add_index :mentions, :post_id
add_index :mentions, :person_id
add_index :mentions, [:person_id, :post_id], :unique => true
end
def self.down
drop_table :mentions
end
end