mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: migrate map repository to kysely (#15348)
* chore: migrate map repository to kysely * chore: add kysely codegen command, exclude from prettier and re-run it on latest migrations * refactor: migrate map repository to kysely * chore: dont log postgres notices
This commit is contained in:
parent
efbc0cb192
commit
c821458e6c
6 changed files with 138 additions and 114 deletions
23
server/src/db.d.ts
vendored
23
server/src/db.d.ts
vendored
|
|
@ -3,16 +3,21 @@
|
|||
* Please do not edit it manually.
|
||||
*/
|
||||
|
||||
import type { ColumnType } from 'kysely';
|
||||
import type { ColumnType } from "kysely";
|
||||
|
||||
export type ArrayType<T> = ArrayTypeImpl<T> extends (infer U)[] ? U[] : ArrayTypeImpl<T>;
|
||||
export type ArrayType<T> = ArrayTypeImpl<T> extends (infer U)[]
|
||||
? U[]
|
||||
: ArrayTypeImpl<T>;
|
||||
|
||||
export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S[], I[], U[]> : T[];
|
||||
export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U>
|
||||
? ColumnType<S[], I[], U[]>
|
||||
: T[];
|
||||
|
||||
export type AssetsStatusEnum = 'active' | 'deleted' | 'trashed';
|
||||
export type AssetsStatusEnum = "active" | "deleted" | "trashed";
|
||||
|
||||
export type Generated<T> =
|
||||
T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
||||
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
|
||||
? ColumnType<S, I | undefined, U>
|
||||
: ColumnType<T, T | undefined, T>;
|
||||
|
||||
export type Int8 = ColumnType<string, bigint | number | string, bigint | number | string>;
|
||||
|
||||
|
|
@ -28,7 +33,7 @@ export type JsonPrimitive = boolean | number | string | null;
|
|||
|
||||
export type JsonValue = JsonArray | JsonObject | JsonPrimitive;
|
||||
|
||||
export type Sourcetype = 'exif' | 'machine-learning';
|
||||
export type Sourcetype = "exif" | "machine-learning";
|
||||
|
||||
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
|
||||
|
||||
|
|
@ -257,7 +262,7 @@ export interface NaturalearthCountries {
|
|||
admin: string;
|
||||
admin_a3: string;
|
||||
coordinates: string;
|
||||
id: number;
|
||||
id: Generated<number>;
|
||||
type: string;
|
||||
}
|
||||
|
||||
|
|
@ -433,6 +438,6 @@ export interface DB {
|
|||
tags_closure: TagsClosure;
|
||||
user_metadata: UserMetadata;
|
||||
users: Users;
|
||||
'vectors.pg_vector_index_stat': VectorsPgVectorIndexStat;
|
||||
"vectors.pg_vector_index_stat": VectorsPgVectorIndexStat;
|
||||
version_history: VersionHistory;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue