diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/schema.sql | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/schema.sql b/src/schema.sql index 140f2a5..789789a 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -37,10 +37,11 @@ CREATE TABLE entities( value text NOT NULL, type entity NOT NULL, detail jsonb, - CONSTRAINT pk_entities PRIMARY KEY (id), - CONSTRAINT uni_entities_value UNIQUE (value) + CONSTRAINT pk_entities PRIMARY KEY (id) ); +CREATE UNIQUE INDEX uni_entities_value ON entities(MD5(value)); + CREATE TABLE access_log( id bigint GENERATED ALWAYS AS IDENTITY, hostname oid NOT NULL, |
