Skip to content

Commit

Permalink
feat: message banners table migration (#5009)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunogois committed Oct 12, 2023
1 parent 2ab2aa1 commit 66304cf
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/migrations/20231012082537-message-banners.js
@@ -0,0 +1,32 @@
'use strict';

exports.up = function (db, cb) {
db.runSql(
`
CREATE TABLE IF NOT EXISTS message_banners
(
id SERIAL PRIMARY KEY NOT NULL,
enabled BOOLEAN DEFAULT true NOT NULL,
message TEXT NOT NULL,
variant TEXT,
sticky BOOLEAN DEFAULT false,
icon TEXT,
link TEXT,
link_text TEXT,
dialog_title TEXT,
dialog TEXT,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()
);
`,
cb,
);
};

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

0 comments on commit 66304cf

Please sign in to comment.