some changes?
This commit is contained in:
12
db/002_subscribers.sql
Normal file
12
db/002_subscribers.sql
Normal file
@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS `subscribers` (
|
||||
`subscriber_id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
`user_id` INTEGER NOT NULL,
|
||||
`kind` VARCHAR(16) NOT NULL,
|
||||
`arguments` JSON NOT NULL DEFAULT '{}',
|
||||
FOREIGN KEY(`user_id`)
|
||||
REFERENCES users(user_id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS subscribers_kind_user_id
|
||||
ON subscribers (`kind`, `user_id`);
|
||||
Reference in New Issue
Block a user