Skip to content

Commit

Permalink
sql: create type as superuser, fails otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
wagner-intevation committed Jan 16, 2025
1 parent c92d904 commit 9ea62a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql/notifications.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ALTER DATABASE :"DBNAME" OWNER TO eventdb_owner;

ALTER TABLE events OWNER TO eventdb_owner;

-- must be superuser to create type
CREATE TYPE ip_endpoint AS ENUM ('source', 'destination');

CREATE SEQUENCE intelmq_ticket_seq MINVALUE 10000001;
ALTER SEQUENCE intelmq_ticket_seq OWNER TO eventdb_send_notifications;

Expand All @@ -29,10 +32,6 @@ GRANT INSERT ON events TO eventdb_insert;
GRANT USAGE ON events_id_seq TO eventdb_insert;
GRANT SELECT ON events TO eventdb_send_notifications;


CREATE TYPE ip_endpoint AS ENUM ('source', 'destination');


-- a single row table to save which day we currently use for intelmq_ticket
CREATE TABLE ticket_day (
initialized_for_day DATE
Expand Down

0 comments on commit 9ea62a3

Please sign in to comment.