refactor: remove structured settings tables, use freeform JSON for presets and entries
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
integer,
|
||||
jsonb,
|
||||
pgTable,
|
||||
text,
|
||||
timestamp,
|
||||
@@ -27,6 +28,13 @@ export const communityPresets = pgTable(
|
||||
onDelete: "set null",
|
||||
}),
|
||||
upvotes: integer("upvotes").default(0).notNull(),
|
||||
// Freeform settings JSON — same flexible structure as performanceEntries.settingsJson
|
||||
settingsJson: jsonb("settings_json").$type<
|
||||
{
|
||||
category: string
|
||||
settings: { title: string; value: string | number | boolean }[]
|
||||
}[]
|
||||
>(),
|
||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||
updatedAt: timestamp("updated_at").defaultNow().notNull(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user