mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-24 22:46:41 +07:00
fix typeorm ncc issue
All checks were successful
Build & Publish / Build & Publish (push) Successful in 1m28s
All checks were successful
Build & Publish / Build & Publish (push) Successful in 1m28s
This commit is contained in:
parent
6c064c24a0
commit
bdb00e84b8
1 changed files with 1 additions and 3 deletions
|
@ -11,8 +11,6 @@ import { LoggerConfig } from "../../logger/types";
|
||||||
import { Request } from "./entities/Request";
|
import { Request } from "./entities/Request";
|
||||||
import { Log } from "./entities/Log";
|
import { Log } from "./entities/Log";
|
||||||
|
|
||||||
const entities = [path.join(__dirname, "./entities/*")];
|
|
||||||
|
|
||||||
export class PostgresDB implements Storage {
|
export class PostgresDB implements Storage {
|
||||||
private connection!: Connection;
|
private connection!: Connection;
|
||||||
private events!: Repository<Event>;
|
private events!: Repository<Event>;
|
||||||
|
@ -32,9 +30,9 @@ export class PostgresDB implements Storage {
|
||||||
this.connection = await createConnection({
|
this.connection = await createConnection({
|
||||||
type: "postgres",
|
type: "postgres",
|
||||||
url: this.config.uri,
|
url: this.config.uri,
|
||||||
entities,
|
|
||||||
logging: this.loggerConfig.level === "debug",
|
logging: this.loggerConfig.level === "debug",
|
||||||
synchronize: true,
|
synchronize: true,
|
||||||
|
entities: [Event, Like, Post, Request, Log],
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.connection.synchronize();
|
await this.connection.synchronize();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue