mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-26 12:21:03 +00:00
feat: adding steam client icon cache
This commit is contained in:
@@ -1,25 +1,21 @@
|
||||
import { DataSource } from "typeorm";
|
||||
import {
|
||||
Game,
|
||||
GameShopCache,
|
||||
Repack,
|
||||
UserPreferences,
|
||||
SteamGame,
|
||||
} from "@main/entity";
|
||||
import type { SqliteConnectionOptions } from "typeorm/driver/sqlite/SqliteConnectionOptions";
|
||||
import { Game, GameShopCache, Repack, UserPreferences } from "@main/entity";
|
||||
import type { BetterSqlite3ConnectionOptions } from "typeorm/driver/better-sqlite3/BetterSqlite3ConnectionOptions";
|
||||
|
||||
import { databasePath } from "./constants";
|
||||
import migrations from "./migrations";
|
||||
|
||||
export const createDataSource = (options: Partial<SqliteConnectionOptions>) =>
|
||||
export const createDataSource = (
|
||||
options: Partial<BetterSqlite3ConnectionOptions>
|
||||
) =>
|
||||
new DataSource({
|
||||
type: "better-sqlite3",
|
||||
database: databasePath,
|
||||
entities: [Game, Repack, UserPreferences, GameShopCache, SteamGame],
|
||||
entities: [Game, Repack, UserPreferences, GameShopCache],
|
||||
synchronize: true,
|
||||
database: databasePath,
|
||||
...options,
|
||||
});
|
||||
|
||||
export const dataSource = createDataSource({
|
||||
migrations: migrations,
|
||||
migrations,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user