Skip to content

fix: Filter out empty snapshot directories#765

Merged
zachdaniel merged 1 commit into
ash-project:mainfrom
Rutgerdj:fix-empty-directory-counts-as-snapshot
May 27, 2026
Merged

fix: Filter out empty snapshot directories#765
zachdaniel merged 1 commit into
ash-project:mainfrom
Rutgerdj:fix-empty-directory-counts-as-snapshot

Conversation

@Rutgerdj

Copy link
Copy Markdown
Contributor

This fixes an issue where you would not get the prompt to rename a table when there's already a directory with the same name as the new table name.

I ran into this issue after reverting some resource snapshots using git, which removed the files, but left the (empty) folders in place.
Probably not a super common scenario, but good to have covered imo.

Added a regression test that verifies the behaviour.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

This fixes an issue where you would not get the prompt to rename a table when there's already a directory with the same name as the *new* table name
@Rutgerdj

Copy link
Copy Markdown
Contributor Author

Failing tests are also failing on main it seems.
At least the migration_generator tests are all green

@zachdaniel zachdaniel merged commit b456c85 into ash-project:main May 27, 2026
100 of 120 checks passed
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

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.

2 participants