diff options
Diffstat (limited to 'src/schema.sql')
| -rw-r--r-- | src/schema.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/schema.sql b/src/schema.sql index 40cab51..fd2f3c5 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -94,6 +94,9 @@ CREATE INDEX idx_entities_retryinsert ON bad_lines(id) WHERE type = 'uninsertable_line' AND detail ->> 'retriedAt' IS NULL; +ALTER TABLE bad_lines + ADD CONSTRAINT bad_lines_have_hostnameid CHECK (detail ? 'hostnameId'); + CREATE OR REPLACE FUNCTION entity(newValue text, newType entity) RETURNS TABLE( id integer, |
