mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
chore(server): typeorm definitions fix part 3 (#1796)
* chore(server): tidy up exif typeorm entity definition * chore(server): tidy up shared link typeorm entity definition * chore(server): tidy up smart info typeorm entity definition * chore(server): tidy up tag typeorm entity definition * ci: add job that checks typeorm migrations are correct and up-to-date
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
||||
import { AssetEntity } from './asset.entity';
|
||||
|
||||
@Entity('smart_info')
|
||||
export class SmartInfoEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: string;
|
||||
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
||||
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
||||
asset?: AssetEntity;
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column({ type: 'uuid' })
|
||||
@PrimaryColumn()
|
||||
assetId!: string;
|
||||
|
||||
@Column({ type: 'text', array: true, nullable: true })
|
||||
@@ -15,8 +15,4 @@ export class SmartInfoEntity {
|
||||
|
||||
@Column({ type: 'text', array: true, nullable: true })
|
||||
objects!: string[] | null;
|
||||
|
||||
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
||||
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
||||
asset?: AssetEntity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user