-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration script for adding user_guid indexes (#79)
* Add migration script for adding user_guid indexes * Add names for new indexes
- Loading branch information
1 parent
859adfa
commit fb86fe7
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable camelcase */ | ||
|
||
exports.shorthands = undefined | ||
|
||
exports.up = (pgm) => { | ||
// Adding indexes | ||
pgm.createIndex('completed_agegroup_entries', 'user_guid', { | ||
ifNotExists: true, | ||
name: completed_agegroup_entries_user_guid_idx, | ||
}) | ||
pgm.createIndex('favourite_tasks', 'user_guid', { | ||
ifNotExists: true, | ||
name: favourite_tasks_user_guid_idx, | ||
}) | ||
pgm.createIndex('notifications', 'user_guid', { | ||
ifNotExists: true, | ||
name: notifications_user_guid_idx, | ||
}) | ||
pgm.createIndex('task_entries', 'user_guid', { | ||
ifNotExists: true, | ||
name: task_entries_user_guid_idx, | ||
}) | ||
pgm.createIndex('task_group_entries', 'user_guid', { | ||
ifNotExists: true, | ||
name: task_group_entries_user_guid_idx, | ||
}) | ||
} | ||
|
||
exports.down = (pgm) => {} |