Add unique index for topic and callback

This commit is contained in:
Peter Stuifzand 2019-03-19 23:39:05 +01:00
parent 071bf66721
commit 72d161add4
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
create table "subscribers"
CREATE TABLE IF NOT EXISTS "subscribers"
(
id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
topic varchar(255) not null,

1
db/02_unique.sql Normal file
View File

@ -0,0 +1 @@
CREATE UNIQUE INDEX IF NOT EXISTS "subscribers_topic_callback" ON "subscribers" ("topic", "callback");