create database structure

This commit is contained in:
Anika Raemer 2025-09-27 17:39:13 +02:00
parent e5b5d7e67d
commit ad6ee64565
15 changed files with 483 additions and 14 deletions

View file

@ -2,7 +2,6 @@ import "reflect-metadata";
import { DataSource } from "typeorm";
import * as dotenv from "dotenv";
import { UserEntity } from "./entities/UserEntity.js";
import { fileURLToPath } from "url";
import { dirname, join } from "path";
@ -26,7 +25,7 @@ export const AppDataSource = new DataSource({
synchronize: NODE_ENV === "dev" ? false : false,
//logging logs sql command on the terminal
logging: NODE_ENV === "dev" ? false : false,
entities: [join(__dirname, "/entities/*.{ts,js}")],
migrations: [join(__dirname, "/migrations/*.{ts,js}")],
entities: [join(__dirname, "/entities/*.{js, ts}")],
migrations: [join(__dirname, "/migrations/*.js")],
subscribers: [],
});