fix(scripts): point migrate:* scripts at TypeORM CLI instead of dead HTTP endpoints (#1198) - #1220
Merged
RUKAYAT-CODER merged 1 commit intoAug 26, 2026
Conversation
…HTTP endpoints (rinafcode#1198) migrate:run, migrate:status, migrate:rollback, migrate:rollback:count, migrate:rollback:to and migrate:reset all curled http://localhost:3000/migrations/... but no controller exposes those routes, so every script failed. Replace the three scripts that have direct TypeORM equivalents with npx typeorm-ts-node-commonjs migration:run/show/revert -d src/config/datasource.ts (aligning them with the existing migration:* scripts) and remove the three without a CLI equivalent (rollback:count, rollback:to, reset) rather than leaving dead HTTP calls in place.
|
@baedboibidex-cmyk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace dead
migrate:*npm scripts that curled non-existent HTTP endpoints (http://localhost:3000/migrations/...) with working TypeORM CLI commands. NoMigrationController/migrations/runroute exists insrc/, so every script failed against a running app. The fix alignsmigrate:*with the existingmigration:*scripts (npx typeorm-ts-node-commonjs migration:run -d src/config/datasource.ts).Closes #1198
Changes
migrate:run→npx typeorm-ts-node-commonjs migration:run -d src/config/datasource.ts(wascurl POST /migrations/run)migrate:status→npx typeorm-ts-node-commonjs migration:show -d src/config/datasource.ts(wascurl GET /migrations)migrate:rollback→npx typeorm-ts-node-commonjs migration:revert -d src/config/datasource.ts(wascurl POST /migrations/rollback)migrate:rollback:count,migrate:rollback:to,migrate:resetwhich had no TypeORM CLI equivalent and only referenced dead HTTP routes (curl .../migrations/rollback/${COUNT},/to/${MIGRATION_NAME},DELETE /migrations/reset)Testing
migrate:*script containscurlorlocalhost:3000/migrations(node -e "require('./package.json')...")migrate:run/migrate:status/migrate:rollbackeach containtypeorm-ts-node-commonjsandsrc/config/datasource.tsmigrate:rollback:count,migrate:rollback:to,migrate:reset) no longer existmigration:run/migration:revert/migration:generateunchangedpnpm run lint:ci(0 errors),pnpm run typecheck(pass),pnpm run build(pass),pnpm run migrations:check(PASS 30 migrations),pnpm run format:check(pass)jest src/config/database.config.spec.ts(3 passed)Checklist
fix/issue-1198-*, Conventional Commitsfix(scripts): ... (#1198))