diff --git a/packages/app/obojobo-express/server/migrations/20221214210826-modify-users-add-last-login-column.js b/packages/app/obojobo-express/server/migrations/20240130162639-modify-users-add-last-login.js similarity index 100% rename from packages/app/obojobo-express/server/migrations/20221214210826-modify-users-add-last-login-column.js rename to packages/app/obojobo-express/server/migrations/20240130162639-modify-users-add-last-login.js diff --git a/packages/app/obojobo-express/server/migrations/20230301155626-create-notification.js b/packages/app/obojobo-express/server/migrations/20240130163052-create-notification-table.js similarity index 88% rename from packages/app/obojobo-express/server/migrations/20230301155626-create-notification.js rename to packages/app/obojobo-express/server/migrations/20240130163052-create-notification-table.js index fa6992209..de4297947 100644 --- a/packages/app/obojobo-express/server/migrations/20230301155626-create-notification.js +++ b/packages/app/obojobo-express/server/migrations/20240130163052-create-notification-table.js @@ -16,7 +16,7 @@ exports.setup = function(options, seedLink) { } exports.up = function(db) { - return db.createTable('notification_status', { + return db.createTable('notifications', { id: { type: 'bigserial', primaryKey: true, @@ -33,7 +33,7 @@ exports.up = function(db) { } exports.down = function(db) { - db.dropTable('notification_status') + db.dropTable('notifications') } exports._meta = { diff --git a/packages/app/obojobo-express/server/viewer/viewer_notification_state.js b/packages/app/obojobo-express/server/viewer/viewer_notification_state.js index f4aa6072d..32103a29a 100644 --- a/packages/app/obojobo-express/server/viewer/viewer_notification_state.js +++ b/packages/app/obojobo-express/server/viewer/viewer_notification_state.js @@ -5,7 +5,7 @@ function getNotifications(ids) { return db.manyOrNone( ` SELECT title,text - FROM notification_status + FROM notifications WHERE id IN ($[ids:csv]) ORDER BY id ASC `, @@ -20,7 +20,7 @@ function getRecentNotifications(date) { return db.manyOrNone( ` SELECT id - FROM notification_status + FROM notifications WHERE created_at >= $[date] ORDER BY created_at ASC `,