mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
refactor: database types (#19624)
This commit is contained in:
parent
09cbc5d3f4
commit
e60bc3c304
99 changed files with 518 additions and 889 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Kysely } from 'kysely';
|
||||
import { Kysely, ColumnType as KyselyColumnType } from 'kysely';
|
||||
|
||||
export type PostgresDB = {
|
||||
pg_am: {
|
||||
|
|
@ -476,3 +476,10 @@ export enum Reason {
|
|||
MissingInSource = 'missing in source',
|
||||
MissingInTarget = 'missing in target',
|
||||
}
|
||||
|
||||
export type Timestamp = KyselyColumnType<Date, Date | string, Date | string>;
|
||||
export type Generated<T> =
|
||||
T extends KyselyColumnType<infer S, infer I, infer U>
|
||||
? KyselyColumnType<S, I | undefined, U>
|
||||
: KyselyColumnType<T, T | undefined, T>;
|
||||
export type Int8 = KyselyColumnType<number>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue