From df1df2b045dc39e41534970f237657a6ad4acbec Mon Sep 17 00:00:00 2001 From: saumildhankar Date: Mon, 21 Apr 2025 02:03:39 +0530 Subject: [PATCH] added announcements table deleted announcements table updated column for emojis --- .../1746060402594_add-announcements-table.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server/migrations/1746060402594_add-announcements-table.js diff --git a/server/migrations/1746060402594_add-announcements-table.js b/server/migrations/1746060402594_add-announcements-table.js new file mode 100644 index 00000000..4dc9543e --- /dev/null +++ b/server/migrations/1746060402594_add-announcements-table.js @@ -0,0 +1,20 @@ +/* eslint-disable camelcase */ + +exports.shorthands = undefined; + +exports.up = pgm => { + pgm.sql(` + CREATE TABLE IF NOT EXISTS announcements ( + id integer primary key, + title character varying NOT NULL, + description TEXT NOT NULL, + is_enabled boolean NOT NULL DEFAULT false + ); + `); +}; + +exports.down = pgm => { + pgm.sql(` + DROP TABLE announcements; + `) +};