From 0fb9e4f88813146b87a357a66e28fa2646a7096e Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Tue, 27 Jan 2026 10:18:25 -0700 Subject: [PATCH] Rename columns --- database/lncvrtgames.sql | 8 ++++---- src/lib/tables.ts | 6 +++--- src/routes/launcher/versions.ts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/database/lncvrtgames.sql b/database/lncvrtgames.sql index 68aa965..bc17dec 100644 --- a/database/lncvrtgames.sql +++ b/database/lncvrtgames.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Host: localhost --- Generation Time: Jan 27, 2026 at 04:31 PM +-- Generation Time: Jan 27, 2026 at 05:18 PM -- Server version: 12.1.2-MariaDB -- PHP Version: 8.5.2 @@ -33,7 +33,7 @@ CREATE TABLE `games` ( `official` tinyint(1) NOT NULL DEFAULT 0, `verified` tinyint(1) NOT NULL DEFAULT 0, `developer` varchar(32) DEFAULT NULL, - `subcategoryNames` text NOT NULL DEFAULT '{}' + `categoryNames` text NOT NULL DEFAULT '\'{}\'' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; -- -------------------------------------------------------- @@ -60,7 +60,7 @@ CREATE TABLE `launcherupdates` ( CREATE TABLE `launcherversionmanifest` ( `id` varchar(24) NOT NULL, - `versionName` text NOT NULL, + `displayName` text NOT NULL, `releaseDate` bigint(20) NOT NULL, `downloadUrls` text NOT NULL, `platforms` text NOT NULL, @@ -71,7 +71,7 @@ CREATE TABLE `launcherversionmanifest` ( `sha512sums` text NOT NULL DEFAULT '[]', `sizes` text NOT NULL DEFAULT '\'[]\'', `changelog` text DEFAULT NULL, - `subcategory` int(11) NOT NULL DEFAULT -1, + `category` int(11) NOT NULL DEFAULT -1, `lastRevision` bigint(20) NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPRESSED; diff --git a/src/lib/tables.ts b/src/lib/tables.ts index 8c5ad1d..e6334e8 100644 --- a/src/lib/tables.ts +++ b/src/lib/tables.ts @@ -45,12 +45,12 @@ export const games = mysqlTable('games', { official: boolean('official').default(false).notNull(), verified: boolean('verified').default(false).notNull(), developer: varchar('developer', { length: 32 }), - subcategoryNames: text('subcategoryNames').default('{}').notNull() + categoryNames: text('categoryNames').default('{}').notNull() }) export const launcherVersionManifest = mysqlTable('launcherversionmanifest', { id: varchar('id', { length: 24 }).primaryKey().notNull(), - versionName: text('versionName').notNull(), + displayName: text('displayName').notNull(), releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(), downloadUrls: text('downloadUrls').notNull(), platforms: text('platforms').notNull(), @@ -64,7 +64,7 @@ export const launcherVersionManifest = mysqlTable('launcherversionmanifest', { sha512sums: text('sha512sums').default('[]').notNull(), sizes: text('sizes').default('[]').notNull(), changelog: text('changelog'), - subcategory: int('subcategory').notNull().default(-1), + category: int('category').notNull().default(-1), lastRevision: bigint('lastRevision', { mode: 'number' }).notNull().default(0) }) diff --git a/src/routes/launcher/versions.ts b/src/routes/launcher/versions.ts index e6296b7..b116ff4 100644 --- a/src/routes/launcher/versions.ts +++ b/src/routes/launcher/versions.ts @@ -73,7 +73,7 @@ export async function handler (context: Context) { const versionsRaw = await db .select({ id: launcherVersionManifest.id, - versionName: launcherVersionManifest.versionName, + displayName: launcherVersionManifest.displayName, releaseDate: launcherVersionManifest.releaseDate, game: launcherVersionManifest.game, downloadUrls: launcherVersionManifest.downloadUrls, @@ -83,7 +83,7 @@ export async function handler (context: Context) { sizes: launcherVersionManifest.sizes, place: launcherVersionManifest.place, changelog: launcherVersionManifest.changelog, - subcategory: launcherVersionManifest.subcategory, + category: launcherVersionManifest.category, lastRevision: launcherVersionManifest.lastRevision }) .from(launcherVersionManifest) @@ -153,7 +153,7 @@ export async function handler (context: Context) { const gamesList = gamesListRaw.map(v => ({ ...v, - subcategoryNames: JSON.parse(v.subcategoryNames) + categoryNames: JSON.parse(v.categoryNames) })) connection.end()