alembic-autogenerate-enums
This package implements an Alembic hook that causes alembic revision --autogenerate to output PostgreSQL ALTER TYPE .. ADD VALUE SQL
statements as part of new migrations.
Usage
Add the line:
import alembic_autogenerate_enums
To the top of your env.py.
Notes
Since ALTER TYPE .. ADD VALUE cannot run transactionally, each
op.sync_enum_values() call creates its own temporary private DB connection.
See https://bitbucket.org/zzzeek/alembic/issues/123/a-way-to-run-non-transactional-ddl
Tests
We have incredibly basic tests in a sample project.
mkvirtualenv alembic-autogenerate
Install the main autogenerate package and then the test harness:
pip install -e .
pip install -e test-harness
createuser alembic-autogenerate
createdb -O alembic-autogenerate alembic-autogenerate_db
cd test-harness && pytest
Metadata
Release files for alembic-autogenerate-enums 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| alembic-autogenerate-enums-0.1.2.tar.gz | 4.9 kB | Without provenance | Details for alembic-autogenerate-enums-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alembic_autogenerate_enums-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for alembic_autogenerate_enums-0.1.2-py3-none-any.whl |
Total release size: 10.1 kB
Release files / alembic-autogenerate-enums-0.1.2.tar.gz
| Download URL | alembic-autogenerate-enums-0.1.2.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
467adc76f1ef32576e514ef55c400c28900547800b676dec349293519751c128
|
|
BLAKE2b-256 checksum How to use checksums |
1533e395de48fcc4d9ac0b3c0d934d3eb128031da0888d2f32edd6a28d0a4c7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.4 Darwin/22.5.0
|
Release files / alembic_autogenerate_enums-0.1.2-py3-none-any.whl
| Download URL | alembic_autogenerate_enums-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07b8fa63b2fca107effc61d3dc86d7ff848dd73b0e6cc9c292e904edcaeb8278
|
|
BLAKE2b-256 checksum How to use checksums |
e9115b63dac59e3761ca021359141ab0fab50e4cbca3ba6da90a7c7d2847328c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.4 Darwin/22.5.0
|
Security for alembic-autogenerate-enums 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.