1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-07 23:23:49 +02:00

implementing mysql GalleryManager

This commit is contained in:
Braun Patrik
2016-12-27 20:55:51 +01:00
parent bb139b8159
commit 53ab3d34a9
25 changed files with 412 additions and 134 deletions

View File

@@ -3,6 +3,8 @@ import {createConnection, Connection} from "typeorm";
import {Config} from "../../config/Config";
import {UserEntity} from "./enitites/UserEntity";
import {UserRoles} from "../../../common/entities/UserDTO";
import {PhotoEntity, PhotoMetadataEntity} from "./enitites/PhotoEntity";
import {DirectoryEnitity} from "./enitites/DirectoryEntity";
export class MySQLConnection {
@@ -31,9 +33,18 @@ export class MySQLConnection {
database: Config.Server.database.mysql.database
},
entities: [
UserEntity
UserEntity,
DirectoryEnitity,
PhotoMetadataEntity,
PhotoEntity
],
autoSchemaSync: true,
logging: {
logQueries: true,
logOnlyFailedQueries: true,
logFailedQueryError: true,
logSchemaCreation: true
}
}).then((conn) => {
this.connection = conn;
return resolve(this.connection);