refactored workspace table

This commit is contained in:
2025-10-22 15:52:56 +02:00
parent f70e924cc3
commit 3d020e7dcf
5 changed files with 1077 additions and 6 deletions

View File

@ -149,15 +149,9 @@ export const haexWorkspaces = sqliteTable(
position: integer(tableNames.haex.workspaces.columns.position)
.notNull()
.default(0),
createdAt: integer(tableNames.haex.workspaces.columns.createdAt, {
mode: 'timestamp',
})
.notNull()
.$defaultFn(() => new Date()),
},
tableNames.haex.workspaces.columns,
),
(table) => [unique().on(table.position)],
)
export type InsertHaexWorkspaces = typeof haexWorkspaces.$inferInsert
export type SelectHaexWorkspaces = typeof haexWorkspaces.$inferSelect