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.1.tar.gz
.
File metadata
- Download URL: chronovoyage-0.2.1.tar.gz
- Upload date:
- Size: 626.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f7a750a782df3be4ca70c56ae47378fb4655133bc8268ec105ca99cbadb915 |
|
MD5 | ec9fb20f2c4ad08ad59d377325c3b68c |
|
BLAKE2b-256 | 21de52b075e41e062998cbfc69b77e98ea283757c6967cc05e79e2d7df80c652 |
Provenance
The following attestation bundles were made for chronovoyage-0.2.1.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.1.tar.gz
- Subject digest:
e8f7a750a782df3be4ca70c56ae47378fb4655133bc8268ec105ca99cbadb915
- Sigstore transparency entry: 146404304
- Sigstore integration time:
- Predicate type:
File details
Details for the file chronovoyage-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: chronovoyage-0.2.1-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 | af457f63c34bd9c1dea695fd69f0511fe5ad7b3f91bf12d6298d6875d2ee56cd |
|
MD5 | 9c4a7ad10c3b3f82e265681bf47f263d |
|
BLAKE2b-256 | d695349145937d59c8d026a26dcd2b47d175db61d5e18701e3b780aa2eae0919 |
Provenance
The following attestation bundles were made for chronovoyage-0.2.1-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.1-py3-none-any.whl
- Subject digest:
af457f63c34bd9c1dea695fd69f0511fe5ad7b3f91bf12d6298d6875d2ee56cd
- Sigstore transparency entry: 146404306
- Sigstore integration time:
- Predicate type: