My database migration framework.
Project description
ChronoVoyage
Table of Contents
Installation
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/noritakaIzumi/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
For more information
We have a documentation for more details.
https://chronovoyagemigration.net/
License
chronovoyage
is distributed under the terms of the MIT license.
Roadmap
- Support for Python
- 3.8
- 3.9 or later
- Database support
- MySQL
- MariaDB
- 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
chronovoyage-0.1.3.tar.gz
(199.5 kB
view details)
Built Distribution
File details
Details for the file chronovoyage-0.1.3.tar.gz
.
File metadata
- Download URL: chronovoyage-0.1.3.tar.gz
- Upload date:
- Size: 199.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 | de651ac9e630373a1eb45f829d240d307e54189f128ecdd0389ad8fd2c517b69 |
|
MD5 | c066337b37d44a22a5b94ab866b1fd41 |
|
BLAKE2b-256 | 02e375a9be84aeafec90300e728b7eeef0886f7eb63a8b01f37fe2117c1756af |
File details
Details for the file chronovoyage-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: chronovoyage-0.1.3-py3-none-any.whl
- Upload date:
- Size: 27.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 | 1f29ccdeee1cf1c09a77674d937d0567d1e03aa0dd89c9285f8694bdbae70250 |
|
MD5 | 7656bb3ca727c823b5672102b53d508f |
|
BLAKE2b-256 | c1276dce71511cf6fb8cf0127cdf4a1aee6bd77666dd100d76ddecb4626ac68e |