refactor: remove structured settings tables, use freeform JSON for presets and entries

This commit is contained in:
2026-04-25 18:51:10 +08:00
parent bc6fc493f6
commit c3a85d1336
11 changed files with 42 additions and 440 deletions
+8
View File
@@ -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(),
},