database_schema_ensurer
Ensures that the database schema is at a certain version.
Usage
Put your migrations in a directory. Each migration SQL file name must obey these rules:
- Start with
{version}_(e.g.1_init.sql.up) - Have two versions:
.up.sqlfor upgrading (adding the necessary things) and.down.sqlfor downgrading (undoing the upgrade) (must have the specified extensions)
from database_schema_ensurer import migrate, Database
class MyDatabase(Database):
...
# Implement all the methods or use a library:
# * Postgres: postgres_schema_ensurer
migrate(
MyDatabase(...),
target_version=OPTIONAL_SPECIFIC_VERSION, # Default: greatest version from the directory
migrations_directory=OPTIONAL_SPECIFIC_DIRECTORY, # Default: "migrations"
)
Metadata
Release files for database-schema-ensurer 2.0.0
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 |
|---|---|---|---|---|
| database_schema_ensurer-2.0.0.tar.gz | 2.4 kB | Without provenance | Details for database_schema_ensurer-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| database_schema_ensurer-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for database_schema_ensurer-2.0.0-py3-none-any.whl |
Total release size: 5.4 kB
Release files / database_schema_ensurer-2.0.0.tar.gz
| Download URL | database_schema_ensurer-2.0.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dc33553c3e41f999f055946c7c6c01cdb8c318d284c04ab9db84e67fefb185f
|
|
BLAKE2b-256 checksum How to use checksums |
8aae779aee4c68af77e5524ee5b8b0878026c6c172aac17d1bd18057a829c46e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-35-generic
|
Release files / database_schema_ensurer-2.0.0-py3-none-any.whl
| Download URL | database_schema_ensurer-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b24bb08187d837c6cb7a22d6649a39f8d9871f64b678065964ff66f26ccd2d1
|
|
BLAKE2b-256 checksum How to use checksums |
de895b451da754c1c081f2997d2b610bcf965c912d497c318ff1309fb7e440af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-35-generic
|
Security for database-schema-ensurer 2.0.0
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.