work
This commit is contained in:
@@ -11,7 +11,7 @@ import { GuildManager } from '../Components/Guild/GuildManager';
|
||||
import { ItemManager } from '../Components/Item/ItemManager';
|
||||
import { RaidManager } from '../Components/Raid/RaidManager';
|
||||
import { CharacterManager } from '../Components/Character/CharacterManager';
|
||||
import { LoginManager } from '../Components/Login/LoginManager';
|
||||
import { UserManager } from '../Components/User/UserManager';
|
||||
import { RootComponent } from '../Injector/ServiceDecorator';
|
||||
import { TableDefinitionExporter } from '../Types/Interfaces';
|
||||
import { AdminConf, TableDefiniton } from '../Types/Types';
|
||||
@@ -19,18 +19,20 @@ import { RPCConfigLoader } from '../Components/RPCConfigLoader';
|
||||
import { FrontworkComponent } from '../Types/FrontworkComponent';
|
||||
import { IAdmin } from './Interface';
|
||||
import { Injector } from '../Injector/Injector';
|
||||
import { Shoutbox } from '../Components/Shoutbox/Shoutbox';
|
||||
|
||||
|
||||
const logger = getLogger("admin", 'debug')
|
||||
|
||||
@RootComponent({
|
||||
implements: IAdmin,
|
||||
imports: [
|
||||
injectable: IAdmin,
|
||||
injects: [
|
||||
GuildManager,
|
||||
ItemManager,
|
||||
RaidManager,
|
||||
CharacterManager,
|
||||
LoginManager
|
||||
UserManager,
|
||||
Shoutbox
|
||||
]
|
||||
})
|
||||
export class FrontworkAdmin
|
||||
@@ -169,7 +171,11 @@ implements TableDefinitionExporter, IAdmin {
|
||||
}
|
||||
|
||||
this.knex = Knex(conf)
|
||||
|
||||
if(conf.client === 'sqlite3'){
|
||||
await this.knex.raw('PRAGMA foreign_keys = ON');
|
||||
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
this.getTableDefinitions()
|
||||
//make unique by name
|
||||
|
||||
Reference in New Issue
Block a user