zgzgorg / iam-backend

0 stars 2 forks source link

check model and migration are match #15

Open kis87988 opened 2 years ago

kis87988 commented 2 years ago

Inspired by https://github.com/4Catalyzer/alembic-autogen-check If we can have a way to check the schema with migration is not match, we can notice developer forget to create a migration.

I am not sure how to implement this yet. Some ideas such as we may be able to just save a schema.sql into a file, and check all has been created. If not, fail the test.

If we cannot implement this feature, feel free to close this issue.

kis87988 commented 2 years ago

found this is useful https://github.com/4Catalyzer/alembic-autogen-check