Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async () => {
const tables = [
ApiTokenTable,
Groups2Entities,
Policies2Entities,
FileTable,
GroupTable,
ImageTable,
PolicyTable,
SettingsTable,
UserTable
];
const sync = new Sync({
tables,
drop: true
});
await sync.execute();
};
export default async (config: Object) => {
const driver: MySQLDriver = (MySQLTable.getDriver(): any);
driver.setConnection(config.entity.driver.getConnection());
const tables = [
SettingsTable,
];
const sync = new Sync({
tables,
drop: true
});
await sync.execute();
};
export default async () => {
const tables = [CategoryTable, PageTable, MenuTable, ElementTable, TagTable, Tags2Pages];
const sync = new Sync({
tables,
drop: true
});
await sync.execute();
};
(async () => {
const tables = [
UserTable,
Identity2RoleTable,
RoleTable,
PermissionTable,
Role2PermissionTable,
RoleGroupTable,
Identity2RoleGroupTable,
Role2RoleGroupTable
];
const sync = new Sync({
tables,
drop: true,
logClass: ConsoleLog
});
await sync.execute();
const { default: importer } = await import("./import");
return importer();
})();
(async () => {
const tables = [
UserTable,
Identity2RoleTable,
RoleTable,
PermissionTable,
Role2PermissionTable,
RoleGroupTable,
Identity2RoleGroupTable,
Role2RoleGroupTable
];
const sync = new Sync({
tables,
drop: true,
logClass: ConsoleLog
});
await sync.execute();
const { default: importer } = await import("./import");
return importer();
})();
(async () => {
const tables = [PageTable, CategoryTable, RevisionTable, FileTable, ImageTable];
const sync = new Sync({
tables,
drop: true,
logClass: ConsoleLog
});
await sync.execute();
const { default: importer } = await import("./import");
return importer();
})();