diff --git a/scripts/placements/index.ts b/scripts/placements/index.ts index cbd0258b4..fbf0d5f91 100644 --- a/scripts/placements/index.ts +++ b/scripts/placements/index.ts @@ -33,6 +33,7 @@ void main(); async function main() { const placements: Placements = []; + wipeMonthYearPlacements(resolveMonthYear(jsonNumber)); for (const mode of modes) { for (const region of regions) { for (const includeWeapon of [false]) { @@ -180,3 +181,19 @@ function addPlacements(placements: Placements) { } })(); } + +function wipeMonthYearPlacements({ + month, + year, +}: { + month: number; + year: number; +}) { + const wipeMonthYearPlacementsStm = sql.prepare(/* sql */ ` + delete from "XRankPlacement" + where "month" = @month + and "year" = @year +`); + + wipeMonthYearPlacementsStm.run({ month, year }); +}