Remove legacy launcher tables

This commit is contained in:
Lncvrt committed 2026-04-19 15:04:12 -07:00
1 parent 626fc4e6df
commit b35f0da493
4 files changed
+24 -83

No files matched your search

+1 -19
View File
@@ -25,24 +25,6 @@ export const users = mysqlTable('users', {
leaderboardsBanned: boolean('leaderboards_banned').default(false).notNull()
})
export const launcherUpdates = mysqlTable('launcherupdates', {
id: varchar('id', { length: 24 }).primaryKey().notNull(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(),
executables: text('executables').notNull(),
hidden: boolean('hidden').default(false).notNull(),
place: bigint('place', { mode: 'number' }).default(0).notNull(),
sha512sums: text('sha512sums').default('[]').notNull()
})
export const loaderUpdates = mysqlTable('loaderupdates', {
id: varchar('id', { length: 24 }).primaryKey().notNull(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
hidden: boolean('hidden').default(false).notNull(),
place: bigint('place', { mode: 'number' }).default(0).notNull()
})
export const games = mysqlTable('games', {
id: bigint('id', { mode: 'number' }).primaryKey().autoincrement().notNull(),
name: text('name').notNull(),
@@ -127,7 +109,7 @@ export const modVersions = mysqlTable('modversions', {
hidden: boolean('hidden').default(false).notNull()
})
export const v2LauncherUpdates = mysqlTable('v2launcherupdates', {
export const launcherUpdates = mysqlTable('launcherupdates', {
id: bigint('id', { mode: 'number' }).primaryKey().autoincrement().notNull(),
version: varchar('version', { length: 32 }).notNull(),
notes: text('notes').notNull(),
+4 -4
View File
@@ -1,4 +1,4 @@
import { v2LauncherUpdates } from '../../../lib/tables'
import { launcherUpdates } from '../../../lib/tables'
import { desc } from 'drizzle-orm'
import {
generateSignature,
@@ -14,10 +14,10 @@ export const handler = async () => {
const version = await db
.select({
version: v2LauncherUpdates.version
version: launcherUpdates.version
})
.from(v2LauncherUpdates)
.orderBy(desc(v2LauncherUpdates.id))
.from(launcherUpdates)
.orderBy(desc(launcherUpdates.id))
.limit(1)
connection.end()
+7 -7
View File
@@ -1,4 +1,4 @@
import { files, v2LauncherUpdates } from '../../../lib/tables'
import { files, launcherUpdates } from '../../../lib/tables'
import { desc, eq } from 'drizzle-orm'
import { getDatabaseConnection, jsonResponse } from '../../../lib/util'
import { Context } from 'elysia'
@@ -14,13 +14,13 @@ export const handler = async (context: Context) => {
const versionsData = await db
.select({
version: v2LauncherUpdates.version,
notes: v2LauncherUpdates.notes,
releaseDate: v2LauncherUpdates.releaseDate,
downloadData: v2LauncherUpdates.downloadData
version: launcherUpdates.version,
notes: launcherUpdates.notes,
releaseDate: launcherUpdates.releaseDate,
downloadData: launcherUpdates.downloadData
})
.from(v2LauncherUpdates)
.orderBy(desc(v2LauncherUpdates.id))
.from(launcherUpdates)
.orderBy(desc(launcherUpdates.id))
.limit(1)
.execute()