1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Fixing persons metadata sql field charset

This commit is contained in:
Patrik J. Braun 2021-03-14 18:23:30 +01:00
parent a5954f1705
commit d02e3cbd33
3 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,9 @@ export class MediaMetadataEntity implements MediaMetadata {
@OneToMany(type => FaceRegionEntry, faceRegion => faceRegion.media)
faces: FaceRegionEntry[];
@Column('simple-array', {select: false, nullable: true})
@Column({type: 'simple-array', select: false, nullable: true,
charset: columnCharsetCS.charset,
collation: columnCharsetCS.collation})
persons: string[]; // Caches the list of persons. Only used for searching
@Column('int', {unsigned: true})

View File

@ -121,7 +121,6 @@ export namespace SearchQueryDTO {
};
export const parse = (str: string, implicitOR = true): SearchQueryDTO => {
console.log('parsing: ' + str);
str = str.replace(/\s\s+/g, ' ') // remove double spaces
.replace(/:\s+/g, ':').replace(/\)(?=\S)/g, ') ').trim();

View File

@ -15,6 +15,7 @@ import {MediaDTO} from '../../../../../src/common/entities/MediaDTO';
// to help WebStorm to handle the test cases
declare let describe: any;
declare const after: any;
declare const before: any;
declare const it: any;
@ -54,7 +55,7 @@ describe('PersonManager', (sqlHelper: SQLTestHelper) => {
};
beforeEach(async () => {
before(async () => {
await setUpSqlDB();
});