Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions database/migrations/V1.4.0.2__initial_schema.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

-- Run header rows for the runs topic.
CREATE TABLE IF NOT EXISTS public_cps_za_runs (
internal_id SERIAL PRIMARY KEY,
Comment thread
lsulak marked this conversation as resolved.
event_id VARCHAR(255) NOT NULL,
job_ref VARCHAR(255) NOT NULL,
tenant_id VARCHAR(255) NOT NULL,
Expand All @@ -42,6 +43,7 @@ CREATE TABLE IF NOT EXISTS public_cps_za_runs_jobs (

-- Data lake change events.
CREATE TABLE IF NOT EXISTS public_cps_za_dlchange (
internal_id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
tenant_id VARCHAR(255) NOT NULL,
source_app VARCHAR(255) NOT NULL,
Expand Down
2 changes: 2 additions & 0 deletions database/migrations/V1.4.0.3__grants.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ GRANT SELECT, INSERT, UPDATE ON TABLE
TO eventgate_writer;

-- Writer needs the SERIAL sequence (public_cps_za_runs_jobs.internal_id) to insert.
GRANT USAGE, SELECT ON SEQUENCE public.public_cps_za_runs_internal_id_seq TO eventgate_writer;
GRANT USAGE, SELECT ON SEQUENCE public.public_cps_za_runs_jobs_internal_id_seq TO eventgate_writer;
GRANT USAGE, SELECT ON SEQUENCE public.public_cps_za_dlchange_internal_id_seq TO eventgate_writer;

-- Default privileges for objects the owner creates in the future.
-- Executed as eventgate_owner: on managed Postgres (Aurora/RDS) the migration user is not a true superuser
Expand Down
Loading