Skip to content

[pull] main from prisma:main#256

Merged
pull[bot] merged 1 commit into
prisma-korea:mainfrom
prisma:main
Jun 18, 2026
Merged

[pull] main from prisma:main#256
pull[bot] merged 1 commit into
prisma-korea:mainfrom
prisma:main

Conversation

@pull

@pull pull Bot commented Jun 18, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

## Summary

Fixes prisma/prisma#29601.

`diagnoseMigrationHistory` was matching a migration from the filesystem
with any migration table row that had the same name. That included rows
marked with `rolled_back_at`, even though those rows are ignored by
migrate when they are not null.

This changes the history comparison to ignore rolled-back rows when
deciding which migrations are already present in the database. A
rolled-back migration that still exists on disk is now reported as
unapplied, which lets `migrate status` return a non-clean result instead
of reporting the schema as up to date.

## Tests

```sh
cargo fmt --check
git diff --check
make dev-sqlite
set -a; . ./.test_database_urls/sqlite; set +a
CARGO_BUILD_JOBS=2 RUST_TEST_THREADS=1 cargo test -p sql-migration-tests diagnose_migrations_history_reports_rolled_back_migration_as_unapplied -- --test-threads 1
CARGO_BUILD_JOBS=2 RUST_TEST_THREADS=1 cargo test -p sql-migration-tests diagnose_migration_history_tests -- --test-threads 1
CARGO_BUILD_JOBS=2 cargo check -p schema-core -p schema-commands -p sql-migration-tests
```
@pull pull Bot locked and limited conversation to collaborators Jun 18, 2026
@pull pull Bot added the ⤵️ pull label Jun 18, 2026
@pull pull Bot merged commit 1171e96 into prisma-korea:main Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant