puerta/cmd/db/migrations/2023-04-15-add-subscriptions.sql

12 lines
272 B
MySQL
Raw Permalink Normal View History

2023-04-16 21:17:36 +00:00
CREATE TABLE subscription(
user INTEGER NOT NULL,
data TEXT NOT NULL,
FOREIGN KEY(user) REFERENCES user(id) ON DELETE CASCADE
);
CREATE INDEX subscription_user ON subscription(user);
ALTER TABLE user ADD COLUMN receives_notifications BOOLEAN DEFAULT 0 NOT NULL;