Skip to content

Commit

Permalink
feat: emails sent table migration
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Oct 24, 2024
1 parent 589d9f1 commit 5acfc70
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/migrations/20241024081537-sent-emails-table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
exports.up = function(db, cb) {
db.runSql(`
CREATE TABLE IF NOT EXISTS sent_emails
(
id VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT now(),
payload JSONB NOT NULL DEFAULT '{}'::jsonb,
PRIMARY KEY (id, type)
);
`, cb)
};

exports.down = function(db, cb) {
db.runSql(`DROP TABLE sent_emails;`, cb);
};

0 comments on commit 5acfc70

Please sign in to comment.