mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
29 lines
529 B
TypeScript
29 lines
529 B
TypeScript
import { DataSource } from "typeorm";
|
|
import {
|
|
DownloadQueue,
|
|
DownloadSource,
|
|
Game,
|
|
GameShopCache,
|
|
Repack,
|
|
UserPreferences,
|
|
UserAuth,
|
|
} from "@main/entity";
|
|
|
|
import { databasePath } from "./constants";
|
|
import * as migrations from "./migrations";
|
|
|
|
export const dataSource = new DataSource({
|
|
type: "better-sqlite3",
|
|
entities: [
|
|
Game,
|
|
Repack,
|
|
UserPreferences,
|
|
GameShopCache,
|
|
DownloadSource,
|
|
DownloadQueue,
|
|
UserAuth,
|
|
],
|
|
synchronize: true,
|
|
database: databasePath,
|
|
migrations,
|
|
});
|