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

@ -0,0 +1,2 @@
DROP INDEX `haex_workspaces_position_unique`;--> statement-breakpoint
ALTER TABLE `haex_workspaces` DROP COLUMN `created_at`;

File diff suppressed because it is too large Load Diff

View File

@ -50,6 +50,13 @@
"when": 1761137108127, "when": 1761137108127,
"tag": "0006_gigantic_bloodaxe", "tag": "0006_gigantic_bloodaxe",
"breakpoints": true "breakpoints": true
},
{
"idx": 7,
"version": "6",
"when": 1761141111765,
"tag": "0007_stale_longshot",
"breakpoints": true
} }
] ]
} }

View File

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

Binary file not shown.