diff --git a/migrations/1715937269727_add-task-guid-indexes.js b/migrations/1715937269727_add-task-guid-indexes.js new file mode 100644 index 0000000..5bf5072 --- /dev/null +++ b/migrations/1715937269727_add-task-guid-indexes.js @@ -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) => {} diff --git a/migrations/1715937269921_add-taskgroup-guid-indexes.js b/migrations/1715937269921_add-taskgroup-guid-indexes.js new file mode 100644 index 0000000..63af467 --- /dev/null +++ b/migrations/1715937269921_add-taskgroup-guid-indexes.js @@ -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) => {} diff --git a/migrations/1715945956654_add-agegroup-guid-indexes.js b/migrations/1715945956654_add-agegroup-guid-indexes.js new file mode 100644 index 0000000..4b6912a --- /dev/null +++ b/migrations/1715945956654_add-agegroup-guid-indexes.js @@ -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) => {}