mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 12:13:10 -05:00
Fix seed script
This commit is contained in:
parent
c9cd840e58
commit
7fab35a461
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user