mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(portal): use replication config in dev (#9676)
This commit is contained in:
@@ -96,8 +96,8 @@ defmodule Domain.Replication.Connection do
|
||||
|
||||
defstruct schema: @schema,
|
||||
step: :disconnected,
|
||||
publication_name: "",
|
||||
replication_slot_name: "",
|
||||
publication_name: nil,
|
||||
replication_slot_name: nil,
|
||||
output_plugin: @output_plugin,
|
||||
proto_version: @proto_version,
|
||||
table_subscriptions: [],
|
||||
@@ -209,7 +209,10 @@ defmodule Domain.Replication.Connection do
|
||||
state.table_subscriptions
|
||||
|> Enum.map_join(",", fn table -> "#{state.schema}.#{table}" end)
|
||||
|
||||
Logger.info("#{__MODULE__}: Creating publication with tables: #{tables}")
|
||||
Logger.info(
|
||||
"#{__MODULE__}: Creating publication #{state.publication_name} with tables: #{tables}"
|
||||
)
|
||||
|
||||
query = "CREATE PUBLICATION #{state.publication_name} FOR TABLE #{tables}"
|
||||
{:query, query, %{state | step: :check_replication_slot}}
|
||||
end
|
||||
|
||||
@@ -34,6 +34,8 @@ config :domain, Domain.Repo,
|
||||
start_apps_before_migration: [:ssl, :logger_json]
|
||||
|
||||
config :domain, Domain.ChangeLogs.ReplicationConnection,
|
||||
replication_slot_name: "change_logs_slot",
|
||||
publication_name: "change_logs_publication",
|
||||
enabled: true,
|
||||
connection_opts: [
|
||||
hostname: "localhost",
|
||||
@@ -67,6 +69,8 @@ config :domain, Domain.ChangeLogs.ReplicationConnection,
|
||||
]
|
||||
|
||||
config :domain, Domain.Events.ReplicationConnection,
|
||||
replication_slot_name: "events_slot",
|
||||
publication_name: "events_publication",
|
||||
enabled: true,
|
||||
connection_opts: [
|
||||
hostname: "localhost",
|
||||
|
||||
Reference in New Issue
Block a user