diff --git a/app/db/seed.ts b/app/db/seed.ts index 34f86e4b9..f2d2689ff 100644 --- a/app/db/seed.ts +++ b/app/db/seed.ts @@ -42,6 +42,7 @@ const basicSeeds = [ users, userProfiles, lastMonthsVoting, + syncPlusTiers, lastMonthSuggestions, thisMonthsSuggestions, badgesToAdmin, @@ -83,8 +84,8 @@ function wipeDB() { "CalendarEventBadge", "CalendarEvent", "UserWeapon", + "PlusTier", "User", - "PlusVote", "PlusSuggestion", "PlusVote", "TournamentBadgeOwner", @@ -299,6 +300,16 @@ function thisMonthsSuggestions() { } } +function syncPlusTiers() { + sql + .prepare( + /* sql */ ` + insert into "PlusTier" ("userId", "tier") select "userId", "tier" from "FreshPlusTier" where "tier" is not null; + ` + ) + .run(); +} + function badgesToAdmin() { const availableBadgeIds = shuffle( sql