Skip to content

Store hash of migration contents when migration is applied #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gonzus opened this issue Jan 15, 2025 · 2 comments
Open

Store hash of migration contents when migration is applied #10

gonzus opened this issue Jan 15, 2025 · 2 comments

Comments

@gonzus
Copy link

gonzus commented Jan 15, 2025

This is done in postgres-migrations and seems to be a good idea.

@KyleJune
Copy link
Member

I thought about that at the time that I made this package but felt it best to leave that functionality out as warnings would cause confusion if someone were to apply new formatting rules to their existing migration files, then there would need to be a way to resolve those.

I feel like the issue of someone change a past migration to behave differently than it use to is something that should be caught in a code review or by test coverage. I agree generally that people shouldn't be modifying the behavior of past migration files as that could lead to new databases differing from existing ones that ran the previous version of the migration file.

@gonzus
Copy link
Author

gonzus commented Jan 15, 2025

Ok, I see. Of course, please feel free to close this issue. Cheers!

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

No branches or pull requests

2 participants