1
0
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:
Mateusz Kwasniewski 2024-10-25 09:53:52 +02:00 committed by GitHub
parent a8d608792d
commit 5662fe79f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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);
};