mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat: emails sent table migration (#8528)
This commit is contained in:
parent
a8d608792d
commit
5662fe79f8
16
src/migrations/20241024081537-sent-emails-table.js
Normal file
16
src/migrations/20241024081537-sent-emails-table.js
Normal file
@ -0,0 +1,16 @@
|
||||
exports.up = function(db, cb) {
|
||||
db.runSql(`
|
||||
CREATE TABLE IF NOT EXISTS emails_sent
|
||||
(
|
||||
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 emails_sent;`, cb);
|
||||
};
|
Loading…
Reference in New Issue
Block a user