diff --git a/src/backend/model/database/sql/enitites/album/AlbumBaseEntity.ts b/src/backend/model/database/sql/enitites/album/AlbumBaseEntity.ts index 7b769559..3d1164aa 100644 --- a/src/backend/model/database/sql/enitites/album/AlbumBaseEntity.ts +++ b/src/backend/model/database/sql/enitites/album/AlbumBaseEntity.ts @@ -4,7 +4,7 @@ import {columnCharsetCS} from '../EntityUtils'; import {AlbumBaseDTO} from '../../../../../../common/entities/album/AlbumBaseDTO'; @Entity() -@TableInheritance({column: {type: 'varchar', name: 'type', length: 16}}) +@TableInheritance({column: {type: 'varchar', name: 'type', length: 24}}) export class AlbumBaseEntity implements AlbumBaseDTO { @Index() diff --git a/test/backend/DBTestHelper.ts b/test/backend/DBTestHelper.ts index 038576cd..15e26671 100644 --- a/test/backend/DBTestHelper.ts +++ b/test/backend/DBTestHelper.ts @@ -38,7 +38,7 @@ export class DBTestHelper { static enable = { memory: false, - sqlite: true, + sqlite: process.env.TEST_SQLITE !== 'false', mysql: process.env.TEST_MYSQL !== 'false' }; public static readonly savedDescribe = savedDescribe; @@ -144,6 +144,7 @@ export class DBTestHelper { } private async resetMySQL(): Promise { + await ObjectManagers.reset(); Config.Server.Database.type = DatabaseType.mysql; Config.Server.Database.mysql.database = 'pigallery2_test'; const conn = await SQLConnection.getConnection();