From 82e36b29e40442c4294337eddafdf2f1f9d4748f Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Wed, 25 Oct 2023 10:31:40 +0000 Subject: [PATCH] feat: add flow_id index in executions --- ...0231025101146_add_flow_id_index_in_executions.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/backend/src/db/migrations/20231025101146_add_flow_id_index_in_executions.ts diff --git a/packages/backend/src/db/migrations/20231025101146_add_flow_id_index_in_executions.ts b/packages/backend/src/db/migrations/20231025101146_add_flow_id_index_in_executions.ts new file mode 100644 index 00000000..ea98e45f --- /dev/null +++ b/packages/backend/src/db/migrations/20231025101146_add_flow_id_index_in_executions.ts @@ -0,0 +1,13 @@ +import { Knex } from 'knex'; + +export async function up(knex: Knex): Promise { + await knex.schema.table('executions', (table) => { + table.index('flow_id'); + }); +} + +export async function down(knex: Knex): Promise { + await knex.schema.table('executions', (table) => { + table.dropIndex('flow_id'); + }); +}