We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function createConnection() takes 30 seconds for my ormconfig. The major reasons of the time consumption are:
When I set migrationRun = false, migration directory was still loaded.
So that I have to switch it myself, like following ...
// entities | subscribers | migrations | elapsed // ---------------------------------------------- // X | X | X | 0.043 // O | X | X | 19.967 // X | O | X | 0.436 // X | X | O | 10.860 // O | O | O | 31.047 const ormConfig = { type: 'mariadb', host: process.env.DB_HOST || '127.0.0.1', port: process.env.DB_PORT || 3306, username: process.env.DB_USER || '****', password: process.env.DB_PASS || '****', database: process.env.DB_NAME || '****', synchronize: (process.env.DB_SYNC == 'true'), logging: (process.env.DB_DEBUG == 'true'), bigNumberStrings: false, entities: [ `${BASE_DIR}/entities/**/*.{ts,js}` ], subscribers: [ `${BASE_DIR}/database/subscriptor/**/*.{ts,js}` ], cli: { 'migrationsDir': `${BASE_DIR}/migration` } }; if (process.env.DB_MIGRATION_RUN === 'true') { ormConfig.migrationsRun = true; ormConfig.migrations = [`${BASE_DIR}/migration/*.{ts,js}`]; } export default ormConfig;
Scan migration directory only if migrationRun = true.
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature Description
The Problem
Function createConnection() takes 30 seconds for my ormconfig.
The major reasons of the time consumption are:
When I set migrationRun = false, migration directory was still loaded.
So that I have to switch it myself, like following ...
The Solution
Scan migration directory only if migrationRun = true.
Considered Alternatives
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: