Skip to content

Commit

Permalink
feat(db): user email unsubscription
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek committed Oct 31, 2024
1 parent 97ad814 commit 770137a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/migrations/20241031102325-user-unsubscription.js
Original file line number Diff line number Diff line change
@@ -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);
};

0 comments on commit 770137a

Please sign in to comment.