fix: migrate to fix incorrect fervidex userIntent

This commit is contained in:
zkldi
2022-11-06 02:29:06 +00:00
parent 3a5c14bdb2
commit 2a71641f9e
2 changed files with 24 additions and 1 deletions
+3 -1
View File
@@ -3,6 +3,7 @@ import UGPTRivalsMigration from "./migrations/add-rivals-to-ugpt";
import FixUndefinedBMSData from "./migrations/fix-undefined-bms-data";
import JoinINFCastHourCharts from "./migrations/join-inf-casthour-charts";
import JoinINFCastHourSongs from "./migrations/join-inf-casthour-songs";
import MarkFervidexAsWithoutIntent from "./migrations/mark-fervidex-as-without-intent";
import NullLR2HookFailedBPs from "./migrations/null-lr2hook-failed-bps";
import RecalcBrokenIIDXNotecounts from "./migrations/recalc-broken-iidx-notecounts";
import RemoveIIDXBeginners from "./migrations/remove-iidx-beginners";
@@ -43,7 +44,8 @@ if (Environment.nodeEnv !== "test") {
RemoveIIDXBeginners,
UpdateJubeatPreferredTables,
JoinINFCastHourCharts,
JoinINFCastHourSongs
JoinINFCastHourSongs,
MarkFervidexAsWithoutIntent
);
}
@@ -0,0 +1,21 @@
import db from "external/mongo/db";
import type { Migration } from "utils/types";
const migration: Migration = {
id: "mark-fervidex-as-without-intent",
up: async () => {
await db.imports.update(
{
importType: "ir/fervidex",
},
{
userIntent: false,
}
);
},
down: () => {
throw new Error(`Unable to revert transaction.`);
},
};
export default migration;