You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop after any failed or unavailable rollback, including missing down.sql.
Preserve an existing post-checkout hook.
Compare migrations by Diesel’s numeric version, not directory name.
Reject ambiguous down.sql candidates instead of choosing the first ref.
Avoid installing a potentially GC-broken /nix/store symlink as the persistent hook.
As i don't know nix at all....BEEP BOOP I AM A ROBOT:
[P2] Stop reverting after a down migration fails — flake.nix:154-156
When reverting multiple orphaned migrations, a failure here only emits a warning and the caller proceeds to
older migrations. If a newer migration cannot be reverted but an older dependency can, the database is left
with the newer migration applied while its prerequisite and ledger entry are removed. Propagate the failure
and stop processing older migrations.
[P2] Preserve existing post-checkout hooks — flake.nix:313-314
When a developer already has a post-checkout hook, ln -sf replaces it without warning, silently disabling any
existing tooling attached to that hook. The installer should refuse installation, preserve and chain the
existing hook, or use a hook-management mechanism rather than overwriting it.
[P2] Compare migrations by Diesel version, not directory name — flake.nix:184
only_old compares full directory names, but Diesel identifies migrations solely by their numeric version. If
a migration is renamed while retaining its timestamp/version—or two branches use different names for the same
version—the hook treats the old directory as removed, executes its down.sql, and deletes the ledger row even
though the new branch still contains that version.
[P2] Do not choose an arbitrary migration when versions collide — flake.nix:166
locate() accepts the first branch or tag containing a requested version. Independent branches can contain
different migrations with the same timestamp/version, so migration-fix may execute an unrelated down.sql. It
should detect multiple distinct candidates and refuse or require an explicit choice.
There is also a lower-severity durability concern: flake.nix:314 is a symlink into /nix/store. It can become
broken after garbage collection or after the dev-shell generation changes because repository symlinks are not
Nix GC roots. This could be addressed alongside the existing “preserve existing hook” finding.
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
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.
@IongIer please take a look at this