-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It was ambiguous what the "internal" event type especially stand for. As currently both of its use cases are some kind of reevaluation - either during the program's startup or due to an event's age -, it was renamed to "incident-age". To ensure database-level stability, the column type was changed from text to a custom enum. Closes #162.
- Loading branch information
1 parent
6b1a76b
commit fb1264c
Showing
5 changed files
with
47 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TYPE event_type AS ENUM ( | ||
'acknowledgement-cleared', | ||
'acknowledgement-set', | ||
'custom', | ||
'downtime-end', | ||
'downtime-removed', | ||
'downtime-start', | ||
'flapping-end', | ||
'flapping-start', | ||
'incident-age', | ||
'state' | ||
); | ||
|
||
UPDATE event SET type = 'incident-age' WHERE type = 'internal'; | ||
|
||
ALTER TABLE event ALTER COLUMN type TYPE event_type USING type::event_type; |