Skip to content

Commit

Permalink
updated migration files
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelDau committed Jan 30, 2024
1 parent 2c76339 commit ec3b5af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -33,7 +33,7 @@ exports.up = function(db) {
}

exports.down = function(db) {
db.dropTable('notification_status')
db.dropTable('notifications')
}

exports._meta = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
`,
Expand All @@ -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
`,
Expand Down

0 comments on commit ec3b5af

Please sign in to comment.