mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
Patch by Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23755 e93f8b46-1217-0410-a6f0-8f06a7374b81
12 lines
397 B
Ruby
12 lines
397 B
Ruby
class CreateReactions < ActiveRecord::Migration[7.2]
|
|
def change
|
|
create_table :reactions do |t|
|
|
t.references :reactable, polymorphic: true, null: false
|
|
t.references :user, null: false
|
|
t.timestamps null: false
|
|
end
|
|
add_index :reactions, [:reactable_type, :reactable_id, :user_id], unique: true
|
|
add_index :reactions, [:reactable_type, :reactable_id, :id]
|
|
end
|
|
end
|