You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running typeorm migration:revert command make oracle driver throw NJS-104 error
Expected Behavior
Having a nice message saying there is nothing to do and close gracefully.
Actual Behavior
Running typeorm migration:revert when there is no migration to revert (migrations table is empty) make the following output :
No migrations were found in the database. Nothing to revert!
Error during migration revert:
Error: NJS-104: connection pool cannot be closed because connections are busy
at Object.throwErr (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\oracledb@6.3.0\node_modules\oracledb\lib\errors.js:603:10)
at Pool.close (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\oracledb@6.3.0\node_modules\oracledb\lib\pool.js:295:14)
at Pool.close [as terminate] (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\oracledb@6.3.0\node_modules\oracledb\lib\util.js:134:10)
at C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\typeorm@0.3.19_oracledb@6.3.0\node_modules\typeorm\driver\oracle\OracleDriver.js:854:18
at new Promise (<anonymous>)
at OracleDriver.closePool (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\typeorm@0.3.19_oracledb@6.3.0\node_modules\typeorm\driver\oracle\OracleDriver.js:853:16)
at OracleDriver.disconnect (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\typeorm@0.3.19_oracledb@6.3.0\node_modules\typeorm\driver\oracle\OracleDriver.js:255:20)
at DataSource.destroy (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\typeorm@0.3.19_oracledb@6.3.0\node_modules\typeorm\data-source\DataSource.js:184:27)
at Object.handler (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\typeorm@0.3.19_oracledb@6.3.0\node_modules\typeorm\commands\MigrationRevertCommand.js:68:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'NJS-104'
Steps to reproduce
Create empty typeorm project and connect it to an oracle database.
Run typeorm migration:revert command
My Environment
Dependency
Version
Operating System
Windows 11
Node.js version
v20.12.2
Typescript version
5.7.2
TypeORM version
0.3.20
oracledb
6.3.0
Database version
19c
Additional Context
No response
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered:
avoid error when there is nothing to revert because datasource is destroyed and query runner
is not released
fix: Error trying to revert last migration when there is none on Oracle
Closes: typeorm#11231
Issue description
Running typeorm migration:revert command make oracle driver throw NJS-104 error
Expected Behavior
Having a nice message saying there is nothing to do and close gracefully.
Actual Behavior
Running
typeorm migration:revert
when there is no migration to revert (migrations
table is empty) make the following output :Steps to reproduce
Create empty typeorm project and connect it to an oracle database.
Run
typeorm migration:revert
commandMy Environment
Additional Context
No response
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered: