mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: kysely migrations (#17198)
This commit is contained in:
parent
6fa0cb534a
commit
55a3c30664
45 changed files with 267 additions and 126 deletions
16
server/src/schema/tables/face-search.table.ts
Normal file
16
server/src/schema/tables/face-search.table.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { AssetFaceTable } from 'src/schema/tables/asset-face.table';
|
||||
import { Column, ColumnIndex, ForeignKeyColumn, Table } from 'src/sql-tools';
|
||||
|
||||
@Table({ name: 'face_search', primaryConstraintName: 'face_search_pkey' })
|
||||
export class FaceSearchTable {
|
||||
@ForeignKeyColumn(() => AssetFaceTable, {
|
||||
onDelete: 'CASCADE',
|
||||
primary: true,
|
||||
constraintName: 'face_search_faceId_fkey',
|
||||
})
|
||||
faceId!: string;
|
||||
|
||||
@ColumnIndex({ name: 'face_index', synchronize: false })
|
||||
@Column({ type: 'vector', array: true, length: 512, synchronize: false })
|
||||
embedding!: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue