mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 22:20:51 +01:00
refactored workspace table
This commit is contained in:
2
src-tauri/database/migrations/0007_stale_longshot.sql
Normal file
2
src-tauri/database/migrations/0007_stale_longshot.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DROP INDEX `haex_workspaces_position_unique`;--> statement-breakpoint
|
||||||
|
ALTER TABLE `haex_workspaces` DROP COLUMN `created_at`;
|
||||||
1068
src-tauri/database/migrations/meta/0007_snapshot.json
Normal file
1068
src-tauri/database/migrations/meta/0007_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -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.
Reference in New Issue
Block a user