feat: kysely 0.29

This commit is contained in:
Daniel Dietzler
2026-05-11 13:47:52 +02:00
parent 271f1cb868
commit 3ad04d8d6b
6 changed files with 24 additions and 9 deletions
+1 -1
View File
@@ -84,7 +84,7 @@
"jose": "^6.0.0",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^9.0.2",
"kysely": "0.28.16",
"kysely": "0.29.0",
"kysely-postgres-js": "^3.0.0",
"lodash": "^4.17.21",
"luxon": "^3.4.2",
@@ -765,6 +765,7 @@ export class AssetRepository {
getTimeBucket(timeBucket: string, options: TimeBucketOptions, auth: AuthDto) {
const order = options.order ?? 'desc';
const query = this.db
.$pickTables<'asset' | 'asset_exif' | 'album_asset' | 'stack'>()
.with('cte', (qb) =>
qb
.selectFrom('asset')
@@ -1,7 +1,8 @@
import { schemaDiff, schemaFromCode, schemaFromDatabase } from '@immich/sql-tools';
import { Injectable } from '@nestjs/common';
import AsyncLock from 'async-lock';
import { FileMigrationProvider, Kysely, Migrator, sql } from 'kysely';
import { Kysely, sql } from 'kysely';
import { FileMigrationProvider, Migrator } from 'kysely/migration';
import { InjectKysely } from 'nestjs-kysely';
import { readdir } from 'node:fs/promises';
import { join } from 'node:path';
@@ -41,7 +41,7 @@ export class NotificationTable {
type!: Generated<NotificationType>;
@Column({ type: 'jsonb', nullable: true })
data!: any | null;
data!: unknown | null;
@Column()
title!: string;
+1
View File
@@ -373,6 +373,7 @@ export function searchAssetBuilder(kysely: Kysely<DB>, options: AssetSearchBuild
const visibility = options.visibility == null ? AssetVisibility.Timeline : options.visibility;
return kysely
.$pickTables<'asset' | 'tag_asset' | 'asset_exif' | 'asset_file' | 'album_asset' | 'ocr_search' | 'smart_search'>()
.withPlugin(joinDeduplicationPlugin)
.selectFrom('asset')
.where('asset.visibility', '=', visibility)