15 lines
528 B
TypeScript
15 lines
528 B
TypeScript
import CreateMigrationsTable from "../src/migrations/CreateMigrationsTable";
|
|
import CreateLogsTable from "../src/migrations/CreateLogsTable";
|
|
import MysqlConnectionManager from "../src/db/MysqlConnectionManager";
|
|
|
|
let migrationsRegistered = false;
|
|
|
|
export default function registerMigrations() {
|
|
if (!migrationsRegistered) {
|
|
migrationsRegistered = true;
|
|
[
|
|
CreateMigrationsTable,
|
|
CreateLogsTable,
|
|
].forEach(m => MysqlConnectionManager.registerMigration(v => new m(v)));
|
|
}
|
|
} |