From b23ab3df21b1b0675537e4d4ef84dd02b543bc7d Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Tue, 19 Nov 2024 18:47:14 -0600 Subject: [PATCH] Adds missing indexes to journey user step table (#544) --- ...119174518_add_journey_user_step_timestamp_index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 apps/platform/db/migrations/20241119174518_add_journey_user_step_timestamp_index.js diff --git a/apps/platform/db/migrations/20241119174518_add_journey_user_step_timestamp_index.js b/apps/platform/db/migrations/20241119174518_add_journey_user_step_timestamp_index.js new file mode 100644 index 00000000..42126992 --- /dev/null +++ b/apps/platform/db/migrations/20241119174518_add_journey_user_step_timestamp_index.js @@ -0,0 +1,11 @@ +exports.up = async function(knex) { + await knex.schema.alterTable('journey_user_step', function(table) { + table.index(['type', 'delay_until']) + }) +} + +exports.down = async function(knex) { + await knex.schema.alterTable('journey_user_step', function(table) { + table.dropIndex(['type', 'delay_until']) + }) +}