Skip to content

Commit ded920f

Browse files
authored
fix: add support for WEBINY_MIGRATION_FORCE_EXECUTE_5_39_6_001 env var
1 parent d65c7e6 commit ded920f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,16 @@ export class MetaFieldsMigration {
7171
});
7272

7373
if (dataMigrationRecordExists) {
74-
this.logger.info("5.39.6-001 migration has already been executed. Exiting...");
75-
return;
74+
const forceExecuteEnvVar = process.env["WEBINY_MIGRATION_FORCE_EXECUTE_5_39_6_001"];
75+
const forceExecute = forceExecuteEnvVar === "true";
76+
if (!forceExecute) {
77+
this.logger.info("5.39.6-001 migration has already been executed. Exiting...");
78+
return;
79+
}
80+
81+
this.logger.info(
82+
"5.39.6-001 migration has already been executed, but force execution was requested."
83+
);
7684
}
7785

7886
this.logger.info("Starting 5.39.6-001 meta fields data migration...");

0 commit comments

Comments
 (0)