Repository navigation
Closed
Labels
Description
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 :
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\[email protected]\node_modules\oracledb\lib\errors.js:603:10)
at Pool.close (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected]\node_modules\oracledb\lib\pool.js:295:14)
at Pool.close [as terminate] (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected]\node_modules\oracledb\lib\util.js:134:10)
at C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected][email protected]\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\[email protected][email protected]\node_modules\typeorm\driver\oracle\OracleDriver.js:853:16)
at OracleDriver.disconnect (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected][email protected]\node_modules\typeorm\driver\oracle\OracleDriver.js:255:20)
at DataSource.destroy (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected][email protected]\node_modules\typeorm\data-source\DataSource.js:184:27)
at Object.handler (C:\Users\aperez3\Documents\dev\coopco\node_modules\.pnpm\[email protected][email protected]\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.
Activity
fix: release query runner when there is no migration to revert
github-actions commentedon Sep 17, 2025
TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).
As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.
🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.