A sqlalchemy/alembic extension for migrating entities like functions, triggers, views, and materialized views.
Project description
Alembic Utils Extended
Autogenerate Support for PostgreSQL Functions, Views, Materialized View, Triggers, and Policies
This is a fork of the much more popular alembic_utils package to extend the capabilities of Alembic, which adds support for autogenerating a larger number of PostgreSQL entity types, including functions, views, materialized views, triggers, and policies.
Quickstart
Visit the quickstart guide for usage instructions.
# migrations/env.py
from alembic_utils_extended.pg_view import PGView
from alembic_utils_extended.replaceable_entity import register_entities
view = PGView(
schema="public",
signature="view",
definition="SELECT 1")
register_entities([view])
The next time you autogenerate a revision, Alembic will detect if your entities are new, updated, or removed and populate the migration script.
alembic revision --autogenerate -m 'message'
Contributing
If you have any issues with contributing, please reach out to justin@joincandidhealth.com so that we can work out any issues you are having! This is mostly just forked directly from alembic_utils, so it's possible something is misconfigured.
Testing
poetry install
poetry run pre-commit run --all-files
poetry run pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alembic_utils_extended-1.0.1.tar.gz.
File metadata
- Download URL: alembic_utils_extended-1.0.1.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65bc81e0f3948306916ff2a0fe5f9ee97a541f675cc0f765dac409cc61ee816a
|
|
| MD5 |
f683fb5ace661ffdbdb3984f01ada113
|
|
| BLAKE2b-256 |
cfb33f2feeea3f4e7b4d8e634f051f25f0a0df6aa3f3a7cb160f95a1da620f25
|
Provenance
The following attestation bundles were made for alembic_utils_extended-1.0.1.tar.gz:
Publisher:
publish.yml on candidhealth/alembic-utils-extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alembic_utils_extended-1.0.1.tar.gz -
Subject digest:
65bc81e0f3948306916ff2a0fe5f9ee97a541f675cc0f765dac409cc61ee816a - Sigstore transparency entry: 278261862
- Sigstore integration time:
-
Permalink:
candidhealth/alembic-utils-extended@9a03ecdbfd924a46de2b9e55b71310cebe5ffdd7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/candidhealth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a03ecdbfd924a46de2b9e55b71310cebe5ffdd7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file alembic_utils_extended-1.0.1-py3-none-any.whl.
File metadata
- Download URL: alembic_utils_extended-1.0.1-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e8809855cd282fed599d1d0f86dd70a6fad54a0af63f55a0b212abe22f25cd3
|
|
| MD5 |
d2c25f93f40a0a9db957a7bfeaef4688
|
|
| BLAKE2b-256 |
6dab5042b5b75c68075a708d915541c30e8c703765e408ebfc8455734dded277
|
Provenance
The following attestation bundles were made for alembic_utils_extended-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on candidhealth/alembic-utils-extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alembic_utils_extended-1.0.1-py3-none-any.whl -
Subject digest:
6e8809855cd282fed599d1d0f86dd70a6fad54a0af63f55a0b212abe22f25cd3 - Sigstore transparency entry: 278261878
- Sigstore integration time:
-
Permalink:
candidhealth/alembic-utils-extended@9a03ecdbfd924a46de2b9e55b71310cebe5ffdd7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/candidhealth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a03ecdbfd924a46de2b9e55b71310cebe5ffdd7 -
Trigger Event:
release
-
Statement type: