No project description provided
Project description
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.sql
for upgrading (adding the necessary things) and.down.sql
for 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(...))
# You can also specify `target_version=` if you want a specific version,
# And you may also specify `migrations_directory` to change the directory the migrations are found at
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
File details
Details for the file database_schema_ensurer-0.1.0.tar.gz
.
File metadata
- Download URL: database_schema_ensurer-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e5b11e0cc7c8bd1ccdfa5186d4f93ccdb59991681be1d90969fad9c3e788d3a |
|
MD5 | e787ae4d4e7a767809faf2416d91cc4b |
|
BLAKE2b-256 | 6cf1493dc26cb492a4d0336da8e49ba7df8895fbffe4cdcd5db49f2b94267053 |
File details
Details for the file database_schema_ensurer-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: database_schema_ensurer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef03ad6d59362c9557c9187af9948f8f8e35d141cc9c8aafff9a1bc7907efbbc |
|
MD5 | eb97076553a4c883ac6b4705bcd81ae9 |
|
BLAKE2b-256 | 2c2f00fed13bdcf57329183db6563ac46915414fe34a92fc70765b9ca9b15aaa |