Skip to content

fix(scripts): point migrate:* scripts at TypeORM CLI instead of dead HTTP endpoints (#1198) - #1220

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
baedboibidex-cmyk:fix/issue-1198-migrate-scripts-http-endpoints
Aug 26, 2026
Merged

fix(scripts): point migrate:* scripts at TypeORM CLI instead of dead HTTP endpoints (#1198)#1220
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
baedboibidex-cmyk:fix/issue-1198-migrate-scripts-http-endpoints

Conversation

@baedboibidex-cmyk

Copy link
Copy Markdown

Summary

Replace dead migrate:* npm scripts that curled non-existent HTTP endpoints (http://localhost:3000/migrations/...) with working TypeORM CLI commands. No MigrationController / migrations/run route exists in src/, so every script failed against a running app. The fix aligns migrate:* with the existing migration:* scripts (npx typeorm-ts-node-commonjs migration:run -d src/config/datasource.ts).

Closes #1198

Changes

  • package.json:41-43migrate:runnpx typeorm-ts-node-commonjs migration:run -d src/config/datasource.ts (was curl POST /migrations/run)
  • package.json:42migrate:statusnpx typeorm-ts-node-commonjs migration:show -d src/config/datasource.ts (was curl GET /migrations)
  • package.json:43migrate:rollbacknpx typeorm-ts-node-commonjs migration:revert -d src/config/datasource.ts (was curl POST /migrations/rollback)
  • package.json:44-46 — removed migrate:rollback:count, migrate:rollback:to, migrate:reset which had no TypeORM CLI equivalent and only referenced dead HTTP routes (curl .../migrations/rollback/${COUNT}, /to/${MIGRATION_NAME}, DELETE /migrations/reset)

Testing

  • Verified no migrate:* script contains curl or localhost:3000/migrations (node -e "require('./package.json')...")
  • Verified migrate:run / migrate:status / migrate:rollback each contain typeorm-ts-node-commonjs and src/config/datasource.ts
  • Verified removed scripts (migrate:rollback:count, migrate:rollback:to, migrate:reset) no longer exist
  • Verified migration:run / migration:revert / migration:generate unchanged
  • Local checks: pnpm 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)
  • Ran jest src/config/database.config.spec.ts (3 passed)

Checklist

  • Follows CONTRIBUTING.md conventions (branch fix/issue-1198-*, Conventional Commits fix(scripts): ... (#1198))
  • All acceptance criteria from migrate:* npm scripts reference HTTP endpoints that don't exist #1198 are met (no script curls dead HTTP endpoints; remaining scripts point at TypeORM CLI)
  • Existing tests pass unchanged
  • New tests cover happy path, named edge cases, and a negative case (script content validation above)
  • CI is green (local verification passed; watching upstream CI)

…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.
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit e55078a into rinafcode:main Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate:* npm scripts reference HTTP endpoints that don't exist

2 participants