My database migration framework.
Project description
ChronoVoyage
Chronovoyage is a simple database migration framework.
Table of Contents
Simple Usage
To use MariaDB version, you need the MariaDB development package (libmariadb-dev
in apt).
pip install chronovoyage[mariadb]
Usage
First, you should name and initialize a directory.
chronovoyage init my-project --vendor mariadb
cd my-project
Edit config.json
.
{
"$schema": "https://raw.githubusercontent.com/fairy-select/chronovoyage/main/schema/config.schema.json",
"vendor": "mariadb",
"connection_info": {
"host": "127.0.0.1",
"port": 3306,
"user": "mariadb",
"password": "password",
"database": "test"
}
}
Create migration template directory.
chronovoyage add ddl initial_migration
If you create DML,
chronovoyage add dml second_migration
Write up sql to go.sql
, and rollback sql to return.sql
.
Then, migrate.
chronovoyage migrate
Contributing
Please read the following docs before you contribute to this repo:
Security Policy
We support the latest version based on GitHub's vulnerability alerts.
License
chronovoyage
is distributed under the terms of the MIT license.
Roadmap
- Support for
- Python 3.8 or later
- Docker
- Database support
- MariaDB
- MySQL
- PostgreSQL
- Migration file support
- SQL (.sql)
- Shell script (.sh)
- Commands
newinit- Create migration directory and config file
generateadd- Create migration files from template
- migrate
- To latest
- To specific version
- From the beginning
- From the middle
- --dry-run
- Show executing SQL
- Detect ddl or dml
statuscurrent- Show current migration status
- rollback
- To version
- test
- Check if every "migrate -> rollback" operation means do nothing for schema
- If dml, the operation means do nothing for data (including autoincrement num)
- Other
- CLI logging
- Documentation
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
File details
Details for the file chronovoyage-0.2.0rc3.tar.gz
.
File metadata
- Download URL: chronovoyage-0.2.0rc3.tar.gz
- Upload date:
- Size: 626.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e436518030ef71a459a27747fd372d0b312c359f57337e902b059f5a7291555c |
|
MD5 | 2068b15c305c25f5074a2cecee473599 |
|
BLAKE2b-256 | bd24ff65fda67f870fc8c89d4b466a49a92fa90e579312cabd179a9b3d8eb571 |
Provenance
The following attestation bundles were made for chronovoyage-0.2.0rc3.tar.gz
:
Publisher:
publish-pip-package.yml
on fairy-select/chronovoyage
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
chronovoyage-0.2.0rc3.tar.gz
- Subject digest:
e436518030ef71a459a27747fd372d0b312c359f57337e902b059f5a7291555c
- Sigstore transparency entry: 146391041
- Sigstore integration time:
- Predicate type:
File details
Details for the file chronovoyage-0.2.0rc3-py3-none-any.whl
.
File metadata
- Download URL: chronovoyage-0.2.0rc3-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85ca842c80be9e79233ae16ab421503c6a971ff7522f56c6a6908742df021565 |
|
MD5 | 754c5a9c7a7eee0d7bbd4db22c224fc5 |
|
BLAKE2b-256 | 5544821104a36903775d20648932dac2632a6fa8651e4e5738f2135877480f47 |
Provenance
The following attestation bundles were made for chronovoyage-0.2.0rc3-py3-none-any.whl
:
Publisher:
publish-pip-package.yml
on fairy-select/chronovoyage
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
chronovoyage-0.2.0rc3-py3-none-any.whl
- Subject digest:
85ca842c80be9e79233ae16ab421503c6a971ff7522f56c6a6908742df021565
- Sigstore transparency entry: 146391042
- Sigstore integration time:
- Predicate type: