Skip to main content

A sqlalchemy/alembic extension for migrating entities like functions, triggers, views, and materialized views.

Project description

Alembic Utils

Test Status Pre-commit Status

License PyPI version Codestyle Black Download count

Python version PostgreSQL version

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

alembic_utils_extended-1.0.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alembic_utils_extended-1.0.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file alembic_utils_extended-1.0.0.tar.gz.

File metadata

  • Download URL: alembic_utils_extended-1.0.0.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

Hashes for alembic_utils_extended-1.0.0.tar.gz
Algorithm Hash digest
SHA256 56fb32b6ae3c7f0bec48652461a354e9b588b4ddedbf6f764a2cd5124135722d
MD5 d41eadbb291f2de810588c7812a765ad
BLAKE2b-256 6d7b5ce7fdc90b2a4af6a0c8e2f6f6b8630927033a6f015a90a96b0fbd074c85

See more details on using hashes here.

Provenance

The following attestation bundles were made for alembic_utils_extended-1.0.0.tar.gz:

Publisher: publish.yml on candidhealth/alembic-utils-extended

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alembic_utils_extended-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for alembic_utils_extended-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4739946999a1f8feb6f9abc5602cf156692e07346b0aa799fe3224b9ef50059
MD5 40431d3f608f398b3e84a7a1e202099d
BLAKE2b-256 6bdaf608c60d5f33434b833a9ec86e6bd4b76ba0b966f0e7c4a59b631f3c6586

See more details on using hashes here.

Provenance

The following attestation bundles were made for alembic_utils_extended-1.0.0-py3-none-any.whl:

Publisher: publish.yml on candidhealth/alembic-utils-extended

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page