Files
redux-scraper/db/migrate/20230523162724_remove_pk_from_follows.rb
2025-01-01 03:29:53 +00:00

11 lines
383 B
Ruby

# typed: true
class RemovePkFromFollows < ActiveRecord::Migration[7.0]
def change
remove_index :domain_fa_follows, :follower_id
remove_index :domain_fa_follows, :followed_id
add_index :domain_fa_follows, %i[follower_id followed_id], unique: true
add_index :domain_fa_follows, %i[followed_id follower_id]
remove_column :domain_fa_follows, :id, :bigint
end
end