Skip to content

Commit

Permalink
#1088 lookup tables
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielwol committed Dec 6, 2024
1 parent c78b0fb commit 1eed832
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
15 changes: 15 additions & 0 deletions events/construction/sql/create-table-itsc_factors-direction.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Table: itsc_factors.direction

-- DROP TABLE IF EXISTS itsc_factors.direction;

CREATE TABLE IF NOT EXISTS itsc_factors.direction
(
code integer NOT NULL,
direction text COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT itsc_factors_direction_pkey PRIMARY KEY (code)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS itsc_factors.direction
OWNER TO congestion_admins;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- Table: itsc_factors.lanesaffectedpattern

-- DROP TABLE IF EXISTS itsc_factors.lanesaffectedpattern;

CREATE TABLE IF NOT EXISTS itsc_factors.lanesaffectedpattern
(
lane_status text COLLATE pg_catalog."default" NOT NULL,
code text COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT lanesaffected_pkey PRIMARY KEY (code)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS itsc_factors.lanesaffectedpattern
OWNER TO congestion_admins;

REVOKE ALL ON TABLE itsc_factors.lanesaffectedpattern FROM bdit_humans;

GRANT INSERT, REFERENCES, SELECT, TRIGGER, UPDATE ON TABLE itsc_factors.lanesaffectedpattern TO bdit_humans WITH GRANT OPTION;

GRANT ALL ON TABLE itsc_factors.lanesaffectedpattern TO congestion_admins;

GRANT ALL ON TABLE itsc_factors.lanesaffectedpattern TO rds_superuser WITH GRANT OPTION;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Table: itsc_factors.locationblocklevel

-- DROP TABLE IF EXISTS itsc_factors.locationblocklevel;

CREATE TABLE IF NOT EXISTS itsc_factors.locationblocklevel
(
code integer NOT NULL,
locationblocklevel text COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT locationblocklevel_pkey PRIMARY KEY (code)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS itsc_factors.locationblocklevel
OWNER TO congestion_admins;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Table: itsc_factors.roadclosuretype_old

-- DROP TABLE IF EXISTS itsc_factors.roadclosuretype_old;

CREATE TABLE IF NOT EXISTS itsc_factors.roadclosuretype_old
(
code integer NOT NULL,
roadclosuretype text COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT roadclosuretype_old_pkey PRIMARY KEY (code)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS itsc_factors.roadclosuretype_old
OWNER TO congestion_admins;

0 comments on commit 1eed832

Please sign in to comment.