Skip to main content

DBWarden PostgreSQL extensions object plugin proof.

Project description

dbwarden-pgsql-extensions

PostgreSQL extension management for DBWarden.

dbwarden-pgsql-extensions is an official DBWarden plugin. It is discovered automatically through its dbwarden.plugins entry point and loaded without a consent prompt once installed.

What It Provides

An object handler for the pg_extension object type. It participates in DBWarden's schema diff pipeline (extract, canonicalize, diff, emit) so that PostgreSQL extensions declared in your configuration are converged with the database. The handler runs in the preamble, before tables, using public ordering anchors (after=PREAMBLE, before=BEFORE_TABLES).

It emits idempotent DDL:

CREATE EXTENSION IF NOT EXISTS "btree_gist";
-- rollback:
DROP EXTENSION IF EXISTS "btree_gist";

Install

dbwarden plugin add dbwarden-pgsql-extensions

plugin add verifies the package provenance (a PyPI PEP 740 attestation from the official repository) before installing. You can also install it directly:

uv add dbwarden-pgsql-extensions
# or
pip install dbwarden-pgsql-extensions

PostgreSQL only.

Use

Declare the extensions your schema needs in your DBWarden configuration (pg_extensions). With the plugin loaded, dbwarden make-migrations diffs the declared extensions against the live database and emits the CREATE EXTENSION / DROP EXTENSION statements in the correct order. Confirm the plugin is loaded:

dbwarden plugin list

Development

pip install -e . pytest
pytest -q

See the object-plugin docs.

License

MIT

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

dbwarden_pgsql_extensions-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

dbwarden_pgsql_extensions-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dbwarden_pgsql_extensions-0.1.0.tar.gz.

File metadata

File hashes

Hashes for dbwarden_pgsql_extensions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 438b7e8b16e17e77264da17a005a532de98a5c6857b39ad0bfd56e9c6a45ca97
MD5 b28b6d57ac900327a7c4770bf5af403e
BLAKE2b-256 8b0b31f741784e1fc5283552c036e847fcf56b0efda12588c8a4a7674d7eea49

See more details on using hashes here.

File details

Details for the file dbwarden_pgsql_extensions-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dbwarden_pgsql_extensions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9275c75b006e2b2c4adba268bf9c2d98204fe6b15111abffaed8e4f1d13ccd1
MD5 65b91399ec0fc57c670adccd8930b9af
BLAKE2b-256 9a523243a3ae4c46c0d1503cd56cc154949377db2e6d95b805e5a6e2de4e52c3

See more details on using hashes here.

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