Allow empty migrations to throw error instead of just pass
#1550
Closed
jd-solanki
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hi, You can already do this using the alembic api. There is a similar example in the cookbook: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋🏻
I switched from Django to FastAPI and glad to know that we have alembic for SQLAlchemy. This is my first discussion/issue in this repo.
I work in a team and most of the people aren't much experienced with alembic so sometimes they accidently adds multiple migration files and sometimes few contains blank migration script and when we run migrate it gets used unknownly.
It will be great if we can strict approach where migration script should atleast do something else raise exception. For example, When we generate the migration and alembic can't detect any changes instead of just
pass
:Can we add error something like:
This will mitigate the unwanted empty migration scripts.
I tried to search it in config options but couldn't find it.
Beta Was this translation helpful? Give feedback.
All reactions