forked from debezium/debezium-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path00_init.sql
29 lines (23 loc) · 1.01 KB
/
00_init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
BEGIN;
create user replicator with replication encrypted password 'zufsob-kuvtum-bImxa6';
SELECT pg_create_physical_replication_slot('replication_slot');
CREATE SCHEMA inventory;
-- customers
CREATE TABLE inventory.customers (
id SERIAL NOT NULL PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
is_test_account BOOLEAN NOT NULL
);
ALTER SEQUENCE inventory.customers_id_seq RESTART WITH 1001;
ALTER TABLE inventory.customers REPLICA IDENTITY FULL;
INSERT INTO inventory.customers
VALUES (default, 'Sally', 'Thomas', '[email protected]', FALSE),
(default, 'George', 'Bailey', '[email protected]', FALSE),
(default, 'Edward', 'Walker', '[email protected]', FALSE),
(default, 'Aidan', 'Barrett', '[email protected]', TRUE),
(default, 'Anne', 'Kretchmar', '[email protected]', TRUE),
(default, 'Melissa', 'Cole', '[email protected]', FALSE),
(default, 'Rosalie', 'Stewart', '[email protected]', FALSE);
COMMIT;