mirror of
https://github.com/FoxxMD/context-mod.git
synced 2026-01-12 07:08:02 -05:00
* Use updated logger adapter so that typeorm can be updated * Update to typeorm 0.3.3 * Refactor naming strategy to be what i want it to be
19 lines
453 B
JavaScript
19 lines
453 B
JavaScript
const {DataSource} = require("typeorm");
|
|
const {CMNamingStrategy} = require("./src/Utils/CMNamingStrategy");
|
|
|
|
const MyDataSource = new DataSource({
|
|
type: "sqljs",
|
|
autoSave: true,
|
|
location: "database.sqlite",
|
|
logging: "all",
|
|
entities: [
|
|
"src/Common/Entities/**/*.js"
|
|
],
|
|
migrations: [
|
|
"src/Common/Migrations/Database/**/*.js"
|
|
],
|
|
namingStrategy: new CMNamingStrategy(),
|
|
})
|
|
|
|
exports.sqljs = MyDataSource;
|