No project description provided
Project description
pilgrimor
Database migration tool with versioning for python projects
Installation:
with pip
pip install pilgrimor
with poetry
poetry add pilgrimor
Usage:
Main commands:
initdb- create technical migrations table.apply- apply new migrations.apply —-version <version number>- apply new migrations with version.rollback —-version <version number>- rollback migrations to version inclusive.rollback —-latest- rollback to latest version.
Necessary things
You need to specify some fields in your pyproject.toml
[tool.pilgrimor]
migrations_dir = "./migrations/"
database_engine = "PSQL"
env_file = "./.env"
migrations_dir - folder with migrations database_engine - there is only one database engine PSQL env_file = path to .env file
Migration file structure:
Migration file contains two blocks - apply and rollback with sql commands. For example:
—- apply —-
SQL CODE
—- rollback —-
SQL CODE
Project details
Release history Release notifications | RSS feed
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 pilgrimor-0.1.2.tar.gz.
File metadata
- Download URL: pilgrimor-0.1.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Darwin/21.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
009deee207b8edb64e818ede7a96940d3ed18e37c69b179ca65ceb1662e94fd4
|
|
| MD5 |
0fac28dfdfa31522c7c8fc6cdbc7cc14
|
|
| BLAKE2b-256 |
0616e9f5829af220d13fa1928d489eb6790ab6ec646f59d33316e933ed17c024
|
File details
Details for the file pilgrimor-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pilgrimor-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Darwin/21.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
963b4b6e1f069926d2a9699f08bc28f1508a1f9fa61952cc64b790ef0bab7e7d
|
|
| MD5 |
48690143b8a47bbbebf685fc12536d97
|
|
| BLAKE2b-256 |
1bef9da1eab14c74df95af88ad2ec6f60751277aa5a910ef4cb797b5043fd63f
|