mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
feat: schema diff sql tools (#17116)
This commit is contained in:
16
server/src/tables/smart-search.table.ts
Normal file
16
server/src/tables/smart-search.table.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Column, ColumnIndex, ForeignKeyColumn, Table } from 'src/sql-tools';
|
||||
import { AssetTable } from 'src/tables/asset.table';
|
||||
|
||||
@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;
|
||||
}
|
||||
Reference in New Issue
Block a user