From fdd1105b100ad476e06f784f00f9b6569b40f7b7 Mon Sep 17 00:00:00 2001 From: Jamil Date: Wed, 30 Apr 2025 13:02:34 -0700 Subject: [PATCH] fix(portal): alter db user role with replication (#8952) We need the `replication` attribute set on the db user. This is trivially done in a migration, and with the `CURRENT_USER` specifier, we don't need to fetch the Application configuration. --- .../20250430195212_alter_role_with_replication.exs | 11 +++++++++++ terraform/environments | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 elixir/apps/domain/priv/repo/migrations/20250430195212_alter_role_with_replication.exs diff --git a/elixir/apps/domain/priv/repo/migrations/20250430195212_alter_role_with_replication.exs b/elixir/apps/domain/priv/repo/migrations/20250430195212_alter_role_with_replication.exs new file mode 100644 index 000000000..111cd464a --- /dev/null +++ b/elixir/apps/domain/priv/repo/migrations/20250430195212_alter_role_with_replication.exs @@ -0,0 +1,11 @@ +defmodule Domain.Repo.Migrations.AlterRoleWithReplication do + use Ecto.Migration + + def up do + execute("ALTER ROLE CURRENT_USER WITH REPLICATION") + end + + def down do + execute("ALTER ROLE CURRENT_USER WITH NOREPLICATION") + end +end diff --git a/terraform/environments b/terraform/environments index c5d260030..466354507 160000 --- a/terraform/environments +++ b/terraform/environments @@ -1 +1 @@ -Subproject commit c5d2600300281fbb27663b2f351b03a4062944aa +Subproject commit 46635450731709632f2bbfa9350647e13037216d