diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-30 17:15:44 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-30 17:15:44 +0900 |
| commit | d674b066a9a3195d764f693885fb9f25d66263ed (patch) | |
| tree | d6f26b80c0b2010f47bcec9b12733d633a8064c4 /db/schema/user-custom-data/userCustomData.ts | |
| parent | 12af09245b38da8cc3fdb851ebb03bc0de45c8be (diff) | |
| parent | 81aa92fecc298d66eb420468316bcf7a7213171c (diff) | |
Merge branch 'dynamic-data-table' into bugfix-schema
Diffstat (limited to 'db/schema/user-custom-data/userCustomData.ts')
| -rw-r--r-- | db/schema/user-custom-data/userCustomData.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/schema/user-custom-data/userCustomData.ts b/db/schema/user-custom-data/userCustomData.ts new file mode 100644 index 00000000..bf529679 --- /dev/null +++ b/db/schema/user-custom-data/userCustomData.ts @@ -0,0 +1,16 @@ +/** + * user custom data + * + * */ +import { integer, json, pgTable, timestamp, uuid, varchar } from "drizzle-orm/pg-core"; +import { users } from "../users"; + +export const userCustomData = pgTable("user_custom_data", { + id: uuid("id").primaryKey().defaultRandom(), + userId: integer("user_id").references(() => users.id), + tableKey: varchar("table_key", { length: 255 }).notNull(), + customSettingName: varchar("custom_setting_name", { length: 255 }).notNull(), + customSetting: json("custom_setting"), + createdDate: timestamp("created_date", { withTimezone: true }).defaultNow().notNull(), + updatedDate: timestamp("updated_date", { withTimezone: true }).defaultNow().notNull(), +}); |
