Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migration scripts for adding task_guid, taskgroup_guid and agegro… #84

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions migrations/1715937269727_add-task-guid-indexes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* eslint-disable camelcase */

exports.shorthands = undefined

exports.up = (pgm) => {
// Adding indexes
pgm.createIndex('favourite_tasks', 'task_guid', {
ifNotExists: true,
name: 'favourite_tasks_task_guid_idx',
})

pgm.createIndex('task_entries', 'task_guid', {
ifNotExists: true,
name: 'task_entries_task_guid_idx',
})

pgm.createIndex('task_entries_history', 'task_guid', {
ifNotExists: true,
name: 'task_entries_history_task_guid_idx',
})
}

exports.down = (pgm) => {}
18 changes: 18 additions & 0 deletions migrations/1715937269921_add-taskgroup-guid-indexes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-disable camelcase */

exports.shorthands = undefined

exports.up = (pgm) => {
pgm.createIndex('task_group_entries', 'taskgroup_guid', {
ifNotExists: true,
name: 'task_group_entries_taskgroup_guid_idx',
})

// task_group_entries_history
pgm.createIndex('task_group_entries_history', 'taskgroup_guid', {
ifNotExists: true,
name: 'task_group_entries_history_taskgroup_guid_idx',
})
}

exports.down = (pgm) => {}
12 changes: 12 additions & 0 deletions migrations/1715945956654_add-agegroup-guid-indexes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable camelcase */

exports.shorthands = undefined

exports.up = (pgm) => {
pgm.createIndex('completed_agegroup_entries', 'agegroup_guid', {
ifNotExists: true,
name: 'completed_agegroup_entries_agegroup_guid_idx',
})
}

exports.down = (pgm) => {}
Loading