mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change paths of up, down and reset
This commit is contained in:
parent
56afb18e81
commit
fda6576714
@ -7,6 +7,5 @@ module.exports = {
|
||||
moduleNameMapper: {
|
||||
'@entity/(.*)': '<rootDir>/../database/entity/$1',
|
||||
'@dbTools/(.*)': '<rootDir>/../database/src/$1',
|
||||
'@migrations/(.*)': '<rootDir>/../database/migrations/$1',
|
||||
},
|
||||
}
|
||||
|
||||
@ -60,7 +60,6 @@
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"@entity": "../database/build/entity",
|
||||
"@migrations": "../database/migrations",
|
||||
"@dbTools": "../database/src"
|
||||
"@dbTools": "../database/build/src"
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,8 +48,7 @@
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
"@entity/*": ["../database/entity/*"],
|
||||
"@dbTools/*": ["../database/src/*"],
|
||||
"@migrations/*": ["../database/migrations/*"]
|
||||
"@dbTools/*": ["../database/src/*"]
|
||||
},
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||
|
||||
@ -4,6 +4,5 @@ DB_USER=root
|
||||
DB_PASSWORD=
|
||||
DB_DATABASE=gradido_community
|
||||
MIGRATIONS_TABLE=migrations
|
||||
MIGRATIONS_DIRECTORY=./migrations/
|
||||
|
||||
TYPEORM_SEEDING_FACTORIES=src/factories/**/*{.ts,.js}
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
// For production you need to put your env file in here.
|
||||
// Please copy the dist file from the root folder in here and rename it to .env
|
||||
@ -10,9 +10,9 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"clean": "tsc --build --clean",
|
||||
"up": "cd build && node src/index.js up",
|
||||
"down": "cd build && node src/index.js down",
|
||||
"reset": "cd build && node src/index.js reset",
|
||||
"up": "node build/src/index.js up",
|
||||
"down": "node build/src/index.js down",
|
||||
"reset": "node build/src/index.js reset",
|
||||
"dev_up": "ts-node src/index.ts up",
|
||||
"dev_down": "ts-node src/index.ts down",
|
||||
"dev_reset": "ts-node src/index.ts reset",
|
||||
@ -45,8 +45,5 @@
|
||||
"ts-mysql-migrate": "^1.0.2",
|
||||
"typeorm": "^0.2.38",
|
||||
"typeorm-seeding": "^1.6.1"
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"@migrations": "./migrations"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ const database = {
|
||||
|
||||
const migrations = {
|
||||
MIGRATIONS_TABLE: process.env.MIGRATIONS_TABLE || 'migrations',
|
||||
MIGRATIONS_DIRECTORY: process.env.MIGRATIONS_DIRECTORY || './migrations/',
|
||||
}
|
||||
|
||||
const CONFIG = { ...database, ...migrations }
|
||||
|
||||
@ -19,7 +19,7 @@ const migration = new Migration({
|
||||
conn: pool,
|
||||
tableName: CONFIG.MIGRATIONS_TABLE,
|
||||
silent: true,
|
||||
dir: path.join(__dirname, '..', CONFIG.MIGRATIONS_DIRECTORY),
|
||||
dir: path.join(__dirname, '..', 'migrations'),
|
||||
})
|
||||
|
||||
const initialize = async (): Promise<void> => {
|
||||
|
||||
@ -46,9 +46,7 @@
|
||||
/* Module Resolution Options */
|
||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
"@migrations/*": ["./migrations/*"],
|
||||
},
|
||||
// "paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [".", "../database"], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||
// "types": [], /* Type declaration files to be included in compilation. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user