Skip to main content

My database migration framework.

Project description

ChronoVoyage

PyPI - Version PyPI - Python Version

logo


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
    • new init
      • create migration directory and config file
    • generate add
      • 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
    • status current
      • 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


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)

Uploaded Source

Built Distribution

chronovoyage-0.1.3-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

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

Hashes for chronovoyage-0.1.3.tar.gz
Algorithm Hash digest
SHA256 de651ac9e630373a1eb45f829d240d307e54189f128ecdd0389ad8fd2c517b69
MD5 c066337b37d44a22a5b94ab866b1fd41
BLAKE2b-256 02e375a9be84aeafec90300e728b7eeef0886f7eb63a8b01f37fe2117c1756af

See more details on using hashes here.

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

Hashes for chronovoyage-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f29ccdeee1cf1c09a77674d937d0567d1e03aa0dd89c9285f8694bdbae70250
MD5 7656bb3ca727c823b5672102b53d508f
BLAKE2b-256 c1276dce71511cf6fb8cf0127cdf4a1aee6bd77666dd100d76ddecb4626ac68e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page