Skip to content
Snippets Groups Projects

Gonrg 4782 add airflow to entitlements bootstrap

Merged Aliaksei Kruk2 requested to merge GONRG-4782-add-airflow-to-entitlements-bootstrap into master
2 files
+ 18
28
Compare changes
  • Side-by-side
  • Inline
Files
2
\c "workflow";
CREATE SCHEMA IF NOT EXISTS "<DATA_PARTITION_ID>" AUTHORIZATION <WORKFLOW_POSTGRESQL_USERNAME>;
CREATE TABLE IF NOT EXISTS <DATA_PARTITION_ID>.workflow (
id text COLLATE pg_catalog."default" NOT NULL,
pk bigint NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
data jsonb NOT NULL,
CONSTRAINT workflow_id UNIQUE (id)
CREATE TABLE IF NOT EXISTS <DATA_PARTITION_ID>.workflow_osm
(
id text COLLATE pg_catalog."default" NOT NULL,
pk bigint NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
data jsonb NOT NULL,
CONSTRAINT workflow_id UNIQUE (id)
) TABLESPACE pg_default;
ALTER TABLE
<DATA_PARTITION_ID>.workflow OWNER to <WORKFLOW_POSTGRESQL_USERNAME>;
CREATE TABLE IF NOT EXISTS <DATA_PARTITION_ID>.workflow_run (
id text COLLATE pg_catalog."default" NOT NULL,
pk bigint NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
data jsonb NOT NULL,
CONSTRAINT workflow_run_id UNIQUE (id)
ALTER TABLE <DATA_PARTITION_ID>.workflow_osm OWNER to <WORKFLOW_POSTGRESQL_USERNAME>;
CREATE TABLE IF NOT EXISTS <DATA_PARTITION_ID>.workflow_run_osm
(
id text COLLATE pg_catalog."default" NOT NULL,
pk bigint NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
data jsonb NOT NULL,
CONSTRAINT workflow_run_id UNIQUE (id)
) TABLESPACE pg_default;
ALTER TABLE
<DATA_PARTITION_ID>.workflow_run OWNER to <WORKFLOW_POSTGRESQL_USERNAME>;
CREATE TABLE IF NOT EXISTS <DATA_PARTITION_ID>.workflow_status (
id text COLLATE pg_catalog."default" NOT NULL,
pk bigint NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
data jsonb NOT NULL,
CONSTRAINT workflow_status_id UNIQUE (id)
) TABLESPACE pg_default;
ALTER TABLE
<DATA_PARTITION_ID>.workflow_status OWNER to <WORKFLOW_POSTGRESQL_USERNAME>;
ALTER TABLE <DATA_PARTITION_ID>.workflow_run_osm
OWNER to <WORKFLOW_POSTGRESQL_USERNAME>;
Loading