Only run migration if SQS is enabled.

This commit is contained in:
mike12345567 2024-06-04 17:39:53 +01:00
parent dbda7b5ee4
commit f062b73852
2 changed files with 12 additions and 8 deletions

View File

@ -1,13 +1,17 @@
// This file should never be manually modified, use `yarn add-app-migration` in order to add a new one // 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 { 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
// Migrations will be executed sorted by id export const MIGRATIONS: AppMigration[] = []
{
id: "20240604153647_update_link_documents", // only run the SQS migration if SQS is enabled
func: m20240604153647_update_link_documents, if (env.SQS_SEARCH_ENABLE) {
}, MIGRATIONS.push({
] id: "20240604153647_initial_sqs",
func: m20240604153647_initial_sqs,
})
}