Initial commit
This commit is contained in:
31
src/lib/tables.ts
Normal file
31
src/lib/tables.ts
Normal 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)
|
||||
})
|
||||
Reference in New Issue
Block a user