# HG changeset patch # User jbe # Date 1492771363 -7200 # Node ID b341544beb7523ff2e1020a71a98c6a61fd4f195 # Parent d88fd3ae32d29c9920b8d9dbc8f694c92d015b04 Renamed table "notification_event_sent" to "event_processed" diff -r d88fd3ae32d2 -r b341544beb75 core.sql --- a/core.sql Thu Mar 30 20:11:59 2017 +0200 +++ b/core.sql Fri Apr 21 12:42:43 2017 +0200 @@ -1682,12 +1682,12 @@ COMMENT ON COLUMN "event"."state" IS 'If issue_id is set: state of affected issue; If state changed: new state'; -CREATE TABLE "notification_event_sent" ( +CREATE TABLE "event_processed" ( "event_id" INT8 NOT NULL ); -CREATE UNIQUE INDEX "notification_event_sent_singleton_idx" ON "notification_event_sent" ((1)); - -COMMENT ON TABLE "notification_event_sent" IS 'This table stores one row with the last event_id, for which notifications have been sent out'; -COMMENT ON INDEX "notification_event_sent_singleton_idx" IS 'This index ensures that "notification_event_sent" only contains one row maximum.'; +CREATE UNIQUE INDEX "event_processed_singleton_idx" ON "event_processed" ((1)); + +COMMENT ON TABLE "event_processed" IS 'This table stores one row with the last event_id, for which event handlers have been executed (e.g. notifications having been sent out)'; +COMMENT ON INDEX "event_processed_singleton_idx" IS 'This index ensures that "event_processed" only contains one row maximum.'; CREATE TABLE "notification_initiative_sent" ( diff -r d88fd3ae32d2 -r b341544beb75 update/core-update.v3.2.2-v4.0.0.sql --- a/update/core-update.v3.2.2-v4.0.0.sql Thu Mar 30 20:11:59 2017 +0200 +++ b/update/core-update.v3.2.2-v4.0.0.sql Fri Apr 21 12:42:43 2017 +0200 @@ -907,6 +907,13 @@ "old_text_value" ISNULL )); +ALTER TABLE "notification_event_sent" RENAME TO "event_processed"; +ALTER INDEX "notification_event_sent_singleton_idx" RENAME TO "event_processed_singleton_idx"; + +COMMENT ON TABLE "event_processed" IS 'This table stores one row with the last event_id, for which event handlers have been executed (e.g. notifications having been sent out)'; +COMMENT ON INDEX "event_processed_singleton_idx" IS 'This index ensures that "event_processed" only contains one row maximum.'; + + CREATE OR REPLACE FUNCTION "write_event_issue_state_changed_trigger"() RETURNS TRIGGER LANGUAGE 'plpgsql' VOLATILE AS $$