feat: kysely migrations (#17198)

This commit is contained in:
Jason Rasmussen
2025-03-29 09:26:24 -04:00
committed by GitHub
parent 6fa0cb534a
commit 55a3c30664
45 changed files with 267 additions and 126 deletions
@@ -0,0 +1,16 @@
import { AssetTable } from 'src/schema/tables/asset.table';
import { Column, ColumnIndex, ForeignKeyColumn, Table } from 'src/sql-tools';
@Table({ name: 'smart_search', primaryConstraintName: 'smart_search_pkey' })
export class SmartSearchTable {
@ForeignKeyColumn(() => AssetTable, {
onDelete: 'CASCADE',
primary: true,
constraintName: 'smart_search_assetId_fkey',
})
assetId!: string;
@ColumnIndex({ name: 'clip_index', synchronize: false })
@Column({ type: 'vector', array: true, length: 512, synchronize: false })
embedding!: string;
}