Migrations Analyser¶
Overview¶
Scans Alembic migrations for schema impacts.
Dependencies¶
Alembic
Manage database schema migrations
Enable/Disable¶
bumpwright --enable-analyser migrations
bumpwright --disable-analyser migrations
[analysers]
migrations = true # set to false to disable
[migrations]
paths = ["migrations"]
See also
For configuration options, see concepts/configuration#analysers.
Severity Rules¶
Change |
Bump |
---|---|
Dropped column |
|
Added non-nullable column without default |
|
Added column |
|
Added index |
|
Example¶
@@
def upgrade():
- pass
+ op.add_column("users", sa.Column("email", sa.String(), nullable=False))
- [MAJOR] migrations/20240401_add_email.py: Added non-nullable column