feat(schema): add sortOrder column to hardware table

This commit is contained in:
2026-04-25 18:19:42 +08:00
parent a31b5ea130
commit 34b75da04d
+2 -1
View File
@@ -1,4 +1,4 @@
import { pgEnum, pgTable, text, timestamp } from "drizzle-orm/pg-core" import { integer, pgEnum, pgTable, text, timestamp } from "drizzle-orm/pg-core"
export const deviceTypeEnum = pgEnum("device_type", ["handled", "console"]) export const deviceTypeEnum = pgEnum("device_type", ["handled", "console"])
@@ -6,5 +6,6 @@ export const hardware = pgTable("hardware", {
slug: text("slug").primaryKey(), slug: text("slug").primaryKey(),
name: text("name").notNull(), name: text("name").notNull(),
deviceType: deviceTypeEnum("device_type").notNull(), deviceType: deviceTypeEnum("device_type").notNull(),
sortOrder: integer("sort_order").default(0).notNull(),
createdAt: timestamp("created_at").defaultNow().notNull(), createdAt: timestamp("created_at").defaultNow().notNull(),
}) })