diff --git a/packages/server/src/appMigrations/migrations.ts b/packages/server/src/appMigrations/migrations.ts index 3d14bd5fa6..48b7f8f0b2 100644 --- a/packages/server/src/appMigrations/migrations.ts +++ b/packages/server/src/appMigrations/migrations.ts @@ -1,13 +1,17 @@ // This file should never be manually modified, use `yarn add-app-migration` in order to add a new one +import env from "../environment" import { AppMigration } from "." -import m20240604153647_update_link_documents from "./migrations/20240604153647_update_link_documents" +import m20240604153647_initial_sqs from "./migrations/20240604153647_initial_sqs" -export const MIGRATIONS: AppMigration[] = [ - // Migrations will be executed sorted by id - { - id: "20240604153647_update_link_documents", - func: m20240604153647_update_link_documents, - }, -] +// Migrations will be executed sorted by ID +export const MIGRATIONS: AppMigration[] = [] + +// only run the SQS migration if SQS is enabled +if (env.SQS_SEARCH_ENABLE) { + MIGRATIONS.push({ + id: "20240604153647_initial_sqs", + func: m20240604153647_initial_sqs, + }) +} diff --git a/packages/server/src/appMigrations/migrations/20240604153647_update_link_documents.ts b/packages/server/src/appMigrations/migrations/20240604153647_initial_sqs.ts similarity index 100% rename from packages/server/src/appMigrations/migrations/20240604153647_update_link_documents.ts rename to packages/server/src/appMigrations/migrations/20240604153647_initial_sqs.ts