]> git.openstreetmap.org Git - rails.git/blob - db/migrate/20231010194809_correct_relation_members_primary_key.rb
Don't send comment text when reopening a note
[rails.git] / db / migrate / 20231010194809_correct_relation_members_primary_key.rb
1 class CorrectRelationMembersPrimaryKey < ActiveRecord::Migration[7.0]
2   disable_ddl_transaction!
3
4   def up
5     alter_primary_key :current_relation_members, [:relation_id, :sequence_id], :algorithm => :concurrently
6     alter_primary_key :relation_members, [:relation_id, :version, :sequence_id], :algorithm => :concurrently
7   end
8
9   def down
10     alter_primary_key :relation_members, [:relation_id, :version, :member_type, :member_id, :member_role, :sequence_id], :algorithm => :concurrently
11     alter_primary_key :current_relation_members, [:relation_id, :member_type, :member_id, :member_role, :sequence_id], :algorithm => :concurrently
12   end
13 end