Skip to content

Commit

Permalink
Add migration script for adding user_guid indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
paularintaharri committed Apr 9, 2024
1 parent 859adfa commit 81cdee6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions migrations/1712659673740_add-user-guid-indexes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable camelcase */

exports.shorthands = undefined

exports.up = (pgm) => {
// Adding indexes
pgm.createIndex('completed_agegroup_entries', 'user_guid', {
ifNotExists: true,
})
pgm.createIndex('favourite_tasks', 'user_guid', { ifNotExists: true })
pgm.createIndex('notifications', 'user_guid', { ifNotExists: true })
pgm.createIndex('task_entries', 'user_guid', { ifNotExists: true })
pgm.createIndex('task_group_entries', 'user_guid', { ifNotExists: true })
}

exports.down = (pgm) => {}

0 comments on commit 81cdee6

Please sign in to comment.