mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
parent
81aa25fa52
commit
5fcca9888d
12 changed files with 93 additions and 270 deletions
|
@ -9,7 +9,6 @@ import { logger, PythonInstance, WindowManager } from "@main/services";
|
|||
import { dataSource } from "@main/data-source";
|
||||
import * as resources from "@locales";
|
||||
import { userPreferencesRepository } from "@main/repository";
|
||||
import { knexClient, migrationConfig } from "./knex";
|
||||
|
||||
const { autoUpdater } = updater;
|
||||
|
||||
|
@ -64,22 +63,8 @@ app.whenReady().then(async () => {
|
|||
return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString());
|
||||
});
|
||||
|
||||
await knexClient.migrate.list(migrationConfig).then((result) => {
|
||||
console.log("Migrations to run:", result[1]);
|
||||
});
|
||||
|
||||
await knexClient.migrate
|
||||
.latest(migrationConfig)
|
||||
.then(() => {
|
||||
console.log("Migrations executed successfully");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("Migrations failed to run:", err);
|
||||
});
|
||||
|
||||
await knexClient.destroy();
|
||||
|
||||
await dataSource.initialize();
|
||||
await dataSource.runMigrations();
|
||||
|
||||
await import("./main");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue