diff --git a/sql/notifications.sql b/sql/notifications.sql index 046c59a..07826ee 100644 --- a/sql/notifications.sql +++ b/sql/notifications.sql @@ -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; @@ -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