refactor(server): move files to separate table (#11861)

This commit is contained in:
Jason Rasmussen
2024-08-19 20:03:33 -04:00
committed by GitHub
parent af3a793fe8
commit 7af6733665
32 changed files with 403 additions and 210 deletions

View File

@@ -1,5 +1,6 @@
import { AlbumEntity } from 'src/entities/album.entity';
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
import { AssetFileEntity } from 'src/entities/asset-files.entity';
import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity';
import { ExifEntity } from 'src/entities/exif.entity';
import { LibraryEntity } from 'src/entities/library.entity';
@@ -72,11 +73,8 @@ export class AssetEntity {
@Column()
originalPath!: string;
@Column({ type: 'varchar', nullable: true })
previewPath!: string | null;
@Column({ type: 'varchar', nullable: true, default: '' })
thumbnailPath!: string | null;
@OneToMany(() => AssetFileEntity, (assetFile) => assetFile.asset)
files!: AssetFileEntity[];
@Column({ type: 'bytea', nullable: true })
thumbhash!: Buffer | null;