mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-13 06:36:49 -05:00
Fix migrations
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "User" (
|
||||
@@ -143,12 +143,12 @@ module.exports.up = function (db) {
|
||||
"votedId";
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop view "PlusVotingResult"`).run();
|
||||
db.prepare(`drop view "PlusTier"`).run();
|
||||
db.prepare(`drop table "User"`).run();
|
||||
db.prepare(`drop table "PlusSuggestion"`).run();
|
||||
db.prepare(`drop table "PlusVote"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "Badge" (
|
||||
@@ -33,13 +33,13 @@ module.exports.up = function (db) {
|
||||
) strict
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop table "Badge"`).run();
|
||||
db.prepare(`drop table "BadgeOwner"`).run();
|
||||
db.prepare(`drop table "BadgeManager"`).run();
|
||||
};
|
||||
}
|
||||
|
||||
function initialBadgesForDb() {
|
||||
return [
|
||||
@@ -1,6 +1,6 @@
|
||||
// add missing min() call to handle multiple results w/ suggests correctly
|
||||
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`drop view "PlusTier"`).run();
|
||||
|
||||
db.prepare(
|
||||
@@ -50,9 +50,9 @@ module.exports.up = function (db) {
|
||||
"votedId";
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop view "PlusTier"`).run();
|
||||
|
||||
db.prepare(
|
||||
@@ -100,4 +100,4 @@ module.exports.down = function (db) {
|
||||
"votedId";
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`alter table "Badge" add "hue" integer`).run();
|
||||
db.prepare(`update "Badge" set "hue" = -72 where "code" = 'ebtv'`).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`alter table "Badge" drop column "hue"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
for (const badge of itzBadges) {
|
||||
db.prepare(
|
||||
`insert into "Badge" ("code", "displayName") values ($code, $displayName)`,
|
||||
).run(badge);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(
|
||||
`delete from "Badge" where "code" in ('itz_red', 'itz_orange', 'itz_blue')`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
const itzBadges = [
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`alter table "User" add column "patronTier" integer`).run();
|
||||
db.prepare(`alter table "User" add column "patronSince" integer`).run();
|
||||
|
||||
@@ -33,9 +33,9 @@ module.exports.up = function (db) {
|
||||
where "patronTier" > 1
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop view "BadgeOwner"`).run();
|
||||
db.prepare(`alter table "User" drop column "patronTier"`).run();
|
||||
db.prepare(`alter table "User" drop column "patronSince"`).run();
|
||||
@@ -45,4 +45,4 @@ module.exports.down = function (db) {
|
||||
).run();
|
||||
|
||||
db.prepare(`alter table "TournamentBadgeOwner" rename to "BadgeOwner"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "CalendarEvent" (
|
||||
@@ -62,9 +62,9 @@ module.exports.up = function (db) {
|
||||
) strict
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
for (const table of [
|
||||
"CalendarEventDate",
|
||||
"CalendarEventResultPlayer",
|
||||
@@ -74,4 +74,4 @@ module.exports.down = function (db) {
|
||||
]) {
|
||||
db.prepare(`drop table "${table}"`).run();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "Build" (
|
||||
@@ -46,10 +46,10 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index build_ability_build_id on "BuildAbility"("buildId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
for (const table of ["Build", "BuildWeapon", "BuildAbility"]) {
|
||||
db.prepare(`drop table "${table}"`).run();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`alter table "User" add "customUrl" text`).run();
|
||||
db.prepare(
|
||||
`create unique index user_custom_url_unique on "User"("customUrl")`,
|
||||
@@ -8,12 +8,12 @@ module.exports.up = function (db) {
|
||||
db.prepare(`alter table "User" add "motionSens" integer`).run();
|
||||
|
||||
db.prepare(`alter table "User" add "inGameName" text`).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop index user_custom_url_unique`).run();
|
||||
db.prepare(`alter table "User" drop column "customUrl"`).run();
|
||||
db.prepare(`alter table "User" drop column "stickSens"`).run();
|
||||
db.prepare(`alter table "User" drop column "motionSens"`).run();
|
||||
db.prepare(`alter table "User" drop column "inGameName"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "MapPool" (
|
||||
@@ -31,13 +31,13 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index calendar_event_map_pool_id on "CalendarEvent"("mapPoolId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
for (const table of ["MapPool", "MapPoolMap"]) {
|
||||
db.prepare(`drop table "${table}"`).run();
|
||||
}
|
||||
|
||||
db.prepare(`drop index calendar_event_map_pool_id`).run();
|
||||
db.prepare(`alter table "CalendarEvent" drop column "mapPoolId"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
for (const table of ["MapPool", "MapPoolMap"]) {
|
||||
db.prepare(`drop table "${table}"`).run();
|
||||
}
|
||||
@@ -22,9 +22,9 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index map_pool_map_calendar_event_id on "MapPoolMap"("calendarEventId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop table "MapPoolMap"`).run();
|
||||
|
||||
// ---
|
||||
@@ -61,4 +61,4 @@ module.exports.down = function (db) {
|
||||
db.prepare(
|
||||
`create index calendar_event_map_pool_id on "CalendarEvent"("mapPoolId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "UserResultHighlight" (
|
||||
@@ -18,8 +18,8 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index user_result_highlight_team_id on "UserResultHighlight"("teamId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop table "UserResultHighlight"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`alter table "CalendarEvent" add "customUrl" text`).run();
|
||||
db.prepare(
|
||||
`alter table "CalendarEvent" add "toToolsEnabled" integer default 0`,
|
||||
@@ -54,9 +54,9 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index tournament_team_member_tournament_team_id on "TournamentTeamMember"("tournamentTeamId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop index calendar_event_custom_url_unique`).run();
|
||||
db.prepare(`drop index map_pool_map_tournament_team_id`).run();
|
||||
db.prepare(`drop index map_pool_map_tie_breaker_calendar_event_id`).run();
|
||||
@@ -74,4 +74,4 @@ module.exports.down = function (db) {
|
||||
|
||||
db.prepare(`drop table "TournamentTeam"`).run();
|
||||
db.prepare(`drop table "TournamentTeamMember"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`
|
||||
create table "UserWeapon" (
|
||||
@@ -16,8 +16,8 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index user_weapon_user_id on "UserWeapon"("userId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.down = function (db) {
|
||||
export function down(db) {
|
||||
db.prepare(`drop table "UserWeapon"`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `alter table "CalendarEvent" drop column "isBeforeStart"`,
|
||||
).run();
|
||||
@@ -128,4 +128,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
/*sql*/ `create index tournament_match_game_result_winner_team_id on "TournamentMatchGameResult"("winnerTeamId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "UnvalidatedUserSubmittedImage" (
|
||||
@@ -74,4 +74,4 @@ module.exports.up = function (db) {
|
||||
"Team"."id" is not null
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `
|
||||
drop table "UnvalidatedUserSubmittedImage"
|
||||
@@ -20,4 +20,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index submitter_user_id on "UnvalidatedUserSubmittedImage"("submitterUserId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(`drop view "PlusTier"`).run();
|
||||
|
||||
db.prepare(
|
||||
@@ -64,4 +64,4 @@ module.exports.up = function (db) {
|
||||
insert into "PlusTier" ("userId", "tier") select "userId", "tier" from "FreshPlusTier" where "tier" is not null;
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(/* sql */ `alter table "User" add "css" text`).run();
|
||||
db.prepare(/* sql */ `alter table "AllTeam" add "css" text`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(/* sql */ `alter table "User" add "patronTill" integer`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`alter table "User" add column "isVideoAdder" integer default 0`,
|
||||
).run();
|
||||
@@ -67,4 +67,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index video_match_player_player_user_id on "VideoMatchPlayer"("playerUserId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "BuildAbility" add "abilityPoints" integer generated always as (case when "slotIndex" = 0 then 10 else 3 end) virtual`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "XRankPlacement" (
|
||||
@@ -40,4 +40,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index splatoon_player_user_id on "SplatoonPlayer"("userId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "favoriteBadgeId" integer`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "CalendarEvent" add "isBeforeStart" integer default 1`,
|
||||
).run();
|
||||
@@ -9,4 +9,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "TournamentTeam" drop column "friendCode"`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "Build" add "private" integer default 0`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(/* sql */ `drop index "calendar_event_custom_url_unique"`).run();
|
||||
db.prepare(/*sql*/ `drop table "TournamentBracket"`).run();
|
||||
db.prepare(/*sql*/ `drop table "TournamentMatchParticipant"`).run();
|
||||
@@ -231,4 +231,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index trust_relationship_trust_receiver_user_id on "TrustRelationship"("trustReceiverUserId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "TournamentSub" (
|
||||
@@ -16,4 +16,4 @@ module.exports.up = function (db) {
|
||||
) strict
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(/* sql */ `alter table "User" add "discordUniqueName" text`).run();
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "showDiscordUniqueName" integer not null default 1`,
|
||||
@@ -6,4 +6,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "UserWeapon" add "isFavorite" integer not null default 0`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
`create index tournament_sub_user_id on "TournamentSub"("userId")`,
|
||||
).run();
|
||||
@@ -111,4 +111,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index tournament_result_tournament_id on "TournamentResult"("tournamentId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "commissionsOpen" integer default 0`,
|
||||
).run();
|
||||
@@ -42,4 +42,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
`create index art_user_metadata_user_id on "ArtUserMetadata"("userId")`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "ArtTag" (
|
||||
@@ -24,4 +24,4 @@ module.exports.up = function (db) {
|
||||
|
||||
db.prepare(`create index tagged_art_art_id on "TaggedArt"("artId")`).run();
|
||||
db.prepare(`create index tagged_art_tag_id on "TaggedArt"("tagId")`).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(`delete from "Skill"`).run();
|
||||
db.prepare(`create index skill_identifier on "Skill"("identifier")`).run();
|
||||
@@ -197,4 +197,4 @@ module.exports.up = function (db) {
|
||||
`create index reported_weapon_user_id on "ReportedWeapon"("userId")`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "banned" integer default 0`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(/* sql */ `alter table "User" add "vc" text default "NO"`).run();
|
||||
db.prepare(/* sql */ `alter table "User" add "languages" text`).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "LogInLink" (
|
||||
@@ -9,4 +9,4 @@ module.exports.up = function (db) {
|
||||
) strict
|
||||
`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(/* sql */ `alter table "Group" add "chatCode" text`).run();
|
||||
db.prepare(/* sql */ `alter table "GroupMatch" add "chatCode" text`).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(/* sql */ `alter table "GroupMatch" add "memento" text`).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(/* sql */ `alter table "GroupMember" add "note" text`).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "TournamentMatch" add "chatCode" text`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
/* sql */ `create index user_patron_tier on "User"("patronTier")`,
|
||||
@@ -11,4 +11,4 @@ module.exports.up = function (db) {
|
||||
/* sql */ `create index calendar_event_result_player_team_id on "CalendarEventResultPlayer"("teamId")`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(`drop view "PlusVotingResult"`).run();
|
||||
|
||||
@@ -34,4 +34,4 @@ module.exports.up = function (db) {
|
||||
`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "plusSkippedForSeasonNth" integer`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "mapModePreferences" text`,
|
||||
@@ -26,4 +26,4 @@ module.exports.up = function (db) {
|
||||
`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "User" add "noScreen" integer default 0`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/*sql*/ `
|
||||
create table "TournamentStaff" (
|
||||
@@ -15,4 +15,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "Tournament" add "castTwitchAccounts" text`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "Tournament" add "settings" text not null default '{"bracketProgression":[{"type":"double_elimination","name":"Main bracket"}]}'`,
|
||||
).run();
|
||||
@@ -15,4 +15,4 @@ module.exports.up = function (db) {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "TournamentMatchGameResult" add "opponentTwoPoints" integer`,
|
||||
).run();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(
|
||||
/* sql */ `alter table "TournamentStage" add "createdAt" integer`,
|
||||
@@ -12,4 +12,4 @@ module.exports.up = function (db) {
|
||||
/* sql */ `alter table "TournamentMatch" drop "childCount"`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports.up = function (db) {
|
||||
export function up(db) {
|
||||
db.transaction(() => {
|
||||
db.prepare(/* sql */ `update "User" set "mapModePreferences" = null`).run();
|
||||
db.prepare(/* sql */ `update "User" set "noScreen" = 0`).run();
|
||||
@@ -20,4 +20,4 @@ module.exports.up = function (db) {
|
||||
`,
|
||||
).run();
|
||||
})();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user