mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 05:11:24 +08:00
15 lines
425 B
TypeScript
15 lines
425 B
TypeScript
import { index, sqliteTable, text } from 'drizzle-orm/sqlite-core'
|
|
|
|
import { crudTimestamps } from './columnHelpers'
|
|
|
|
export const preferenceTable = sqliteTable(
|
|
'preference',
|
|
{
|
|
scope: text().notNull(), // scope is reserved for future use, now only 'default' is supported
|
|
key: text().notNull(),
|
|
value: text({ mode: 'json' }),
|
|
...crudTimestamps
|
|
},
|
|
(t) => [index('scope_name_idx').on(t.scope, t.key)]
|
|
)
|