add setup.sql
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
parent
fbd32b2ec0
commit
ef53cb079d
1 changed files with 18 additions and 0 deletions
18
sql/setup.sql
Normal file
18
sql/setup.sql
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
ALTER SYSTEM SET wal_level = logical;
|
||||||
|
|
||||||
|
-- restart the server
|
||||||
|
|
||||||
|
CREATE ROLE subscriber LOGIN REPLICATION PASSWORD 'subscriber';
|
||||||
|
|
||||||
|
CREATE PUBLICATION mi_publication
|
||||||
|
FOR TABLES IN SCHEMA public
|
||||||
|
WITH (publish = 'insert, update, delete');
|
||||||
|
|
||||||
|
-- on the subscriber side
|
||||||
|
|
||||||
|
--- Precondition: schema and data prior to starting the publication present
|
||||||
|
|
||||||
|
CREATE SUBSCRIPTION mi_subscription
|
||||||
|
CONNECTION 'postgresql://subscriber:subscriber@localhost:5432/misskey'
|
||||||
|
PUBLICATION mi_publication;
|
||||||
|
|
Loading…
Reference in a new issue