Skip to content

Commit

Permalink
chg: [db] rename / remove indexes for decoupling redisinstances
Browse files Browse the repository at this point in the history
  • Loading branch information
gallypette committed Jun 21, 2024
1 parent b58785c commit 6dae3e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions priv/repo/migrations/20240621075140_redis_decoupling_indexes.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
defmodule Cocktailparty.Repo.Migrations.RedisDecouplingIndexes do
use Ecto.Migration

def change do
drop unique_index(:redisinstances, [:name])
execute "ALTER TABLE sinks DROP CONSTRAINT sinks_redis_instance_id_fkey"
execute "ALTER TABLE sources DROP CONSTRAINT sources_redis_instance_id_fkey"
execute "ALTER INDEX redisinstances_pkey RENAME TO connections_pkey"
end
end

0 comments on commit 6dae3e8

Please sign in to comment.