Skip to content

fix: remove dead SchemaMigrationService and unused Migration entity - #1377

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
dedukpe:remove-schema-migration-dead-code
Aug 29, 2026
Merged

fix: remove dead SchemaMigrationService and unused Migration entity#1377
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
dedukpe:remove-schema-migration-dead-code

Conversation

@dedukpe

@dedukpe dedukpe commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove SchemaMigrationService, the Migration entity, and the entities/ directory — all dead code that was never wired up.

Closes

Closes #1199

Changes

File Action
src/migrations/schema-migration.service.ts Deleted
src/migrations/entities/migration.entity.ts Deleted
src/migrations/entities/ Deleted (directory)
src/config/datasource.ts Updated comments to reflect the removal

Why

SchemaMigrationService queries and inserts into a schema_migrations table, but:

  1. No module registers it — it is never injected anywhere in the codebase.
  2. No migration creates the table — the project uses TypeORM's built-in migrations table.
  3. No code imports the Migration entity — zero references across the entire src/ directory.

The service and entity only sat in the src/migrations/ directory, where the TypeORM migration glob in datasource.ts had to be explicitly configured to ignore them (via the [0-9]* timestamp prefix pattern). This makes the code misleading and a maintenance burden.

Verification

  • tsc --noEmit passes with no errors
  • nest build succeeds
  • No imports or references to the deleted files remain in the codebase

SchemaMigrationService and the schema_migrations table were never
wired up — no module registered the service, no migration created the
table, and no code imported the Migration entity. They only sat in the
migrations directory, where TypeORM's migration glob had to be
explicitly configured to ignore them.

Closes rinafcode#1199

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER
RUKAYAT-CODER merged commit d9641a4 into rinafcode:main Aug 29, 2026
6 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.

SchemaMigrationService and the schema_migrations table are dead code

2 participants