Initial commit

This commit is contained in:
2025-11-01 12:16:01 -07:00
commit 8383b6f63e
15 changed files with 1194 additions and 0 deletions

31
src/lib/tables.ts Normal file
View File

@@ -0,0 +1,31 @@
import { bigint, boolean, int, mysqlTable, text, varchar } from "drizzle-orm/mysql-core";
export const launcherGames = mysqlTable('launchergames', {
id: int('id').primaryKey().autoincrement(),
name: text('name').notNull(),
official: boolean('official').notNull().default(false),
verified: boolean('verified').notNull().default(false),
cutOff: int('cutOff').notNull().default(-1)
})
export const launcherVersions = mysqlTable('launcherversions', {
id: varchar('id', { length: 24 }).primaryKey(),
versionName: text('versionName').notNull(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(),
executables: text('executables').notNull(),
hidden: boolean('hidden').notNull().default(true),
game: int('game').notNull().default(0).references(() => launcherGames.id),
place: int('place').notNull().default(0)
})
export const launcherUpdates = mysqlTable('launcherupdates', {
id: varchar('id', { length: 24 }).primaryKey(),
releaseDate: bigint('releaseDate', { mode: 'number' }).notNull(),
downloadUrls: text('downloadUrls').notNull(),
platforms: text('platforms').notNull(),
executables: text('executables').notNull(),
hidden: boolean('hidden').notNull().default(true),
place: int('place').notNull().default(0)
})