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.
This commit is contained in:
Jamil
2025-04-30 13:02:34 -07:00
committed by GitHub
parent 8dd794d8c8
commit fdd1105b10
2 changed files with 12 additions and 1 deletions

View File

@@ -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