1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

feat(db): user email un-subscription (#8612)

Opt-out table for emails
This commit is contained in:
Tymoteusz Czech 2024-10-31 12:38:15 +01:00 committed by GitHub
parent ca307b2bab
commit 28f821cb34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,15 @@
exports.up = function(db, cb) {
db.runSql(`
CREATE TABLE IF NOT EXISTS user_unsubscription
(
user_id INTEGER NOT NULL references users (id),
subscription VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT now(),
PRIMARY KEY (user_id, subscription)
);
`, cb);
};
exports.down = function(db, cb) {
db.runSql(`DROP TABLE IF EXISTS user_unsubscription;`, cb);
};