diff --git a/src/backend/model/database/sql/enitites/MediaEntity.ts b/src/backend/model/database/sql/enitites/MediaEntity.ts index 8e480551..33e51876 100644 --- a/src/backend/model/database/sql/enitites/MediaEntity.ts +++ b/src/backend/model/database/sql/enitites/MediaEntity.ts @@ -16,15 +16,8 @@ export class MediaDimensionEntity implements MediaDimension { } -const arrayTransformer: ValueTransformer = { - to: (value: string[]): string => value ? value.join(',') : null, - from: (value: string): string[] => value ? value.split(',') : null -}; - export class MediaMetadataEntity implements MediaMetadata { - - @Index() - @Column('varchar', {length: 128}) + @Column('text') caption: string; @Column(type => MediaDimensionEntity) @@ -46,11 +39,8 @@ export class MediaMetadataEntity implements MediaMetadata { @Column('int', {unsigned: true}) fileSize: number; - @Index() @Column({ - type: 'varchar', - length: 512, - transformer: arrayTransformer, + type: 'simple-array', charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -62,7 +52,6 @@ export class MediaMetadataEntity implements MediaMetadata { @Column(type => PositionMetaDataEntity) positionData: PositionMetaDataEntity; - @Index() @Column('tinyint', {unsigned: true}) rating: 0 | 1 | 2 | 3 | 4 | 5; @@ -75,12 +64,8 @@ export class MediaMetadataEntity implements MediaMetadata { /** * Caches the list of persons. Only used for searching */ - @Index() @Column({ - type: 'varchar', - select: false, nullable: true, - length: 512, - transformer: arrayTransformer, + type: 'simple-array', select: false, nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -104,7 +89,6 @@ export abstract class MediaEntity implements MediaDTO { @PrimaryGeneratedColumn({unsigned: true}) id: number; - @Index() @Column(columnCharsetCS) name: string; diff --git a/src/backend/model/database/sql/enitites/PhotoEntity.ts b/src/backend/model/database/sql/enitites/PhotoEntity.ts index 174d7ba7..b12bf32d 100644 --- a/src/backend/model/database/sql/enitites/PhotoEntity.ts +++ b/src/backend/model/database/sql/enitites/PhotoEntity.ts @@ -10,8 +10,7 @@ export class CameraMetadataEntity implements CameraMetadata { @Column({ - type: 'varchar', nullable: true, - length: 64, + type: 'text', nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -19,8 +18,7 @@ export class CameraMetadataEntity implements CameraMetadata { @Column({ - type: 'varchar', nullable: true, - length: 64, + type: 'text', nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -58,8 +56,7 @@ export class PositionMetaDataEntity implements PositionMetaData { @Index() @Column({ - type: 'varchar', nullable: true, - length: 64, + type: 'text', nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -67,8 +64,7 @@ export class PositionMetaDataEntity implements PositionMetaData { @Index() @Column({ - type: 'varchar', nullable: true, - length: 64, + type: 'text', nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) @@ -76,8 +72,7 @@ export class PositionMetaDataEntity implements PositionMetaData { @Index() @Column({ - type: 'varchar', nullable: true, - length: 64, + type: 'text', nullable: true, charset: columnCharsetCS.charset, collation: columnCharsetCS.collation }) diff --git a/src/common/DataStructureVersion.ts b/src/common/DataStructureVersion.ts index 14f8adb1..477ee4e5 100644 --- a/src/common/DataStructureVersion.ts +++ b/src/common/DataStructureVersion.ts @@ -1 +1 @@ -export const DataStructureVersion = 20; +export const DataStructureVersion = 21; diff --git a/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts b/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts index 66767e86..dd2ef53e 100644 --- a/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts +++ b/src/frontend/app/ui/settings/indexing/indexing.settings.component.ts @@ -42,8 +42,12 @@ export class IndexingSettingsComponent extends SettingsComponentDirective