Skip to main content

My database migration framework.

Project description

ChronoVoyage

PyPI - Version PyPI - Python Version PyPI - License Package Health | Snyk

logo

Chronovoyage is a simple database migration framework.

Visit Documentation


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.

Security Policy

License

chronovoyage is distributed under the terms of the MIT license.

License

Roadmap

  • Support for
    • Python 3.8 or later
    • Docker
  • Database support
    • MariaDB
    • MySQL
    • 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.7.tar.gz (623.9 kB view details)

Uploaded Source

Built Distribution

chronovoyage-0.1.7-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file chronovoyage-0.1.7.tar.gz.

File metadata

  • Download URL: chronovoyage-0.1.7.tar.gz
  • Upload date:
  • Size: 623.9 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.7.tar.gz
Algorithm Hash digest
SHA256 05282d1109d4be007c9e507981b5e4e9caffc81feb647d9433073f6672c9e316
MD5 4a3881fbe4cf9c337166c12f8d253c88
BLAKE2b-256 b2251f5e96ea7c6811217cbde0d36fa832e27523d649e225ef55e46e7b784f66

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronovoyage-0.1.7.tar.gz:

Publisher: publish.yml on fairy-select/chronovoyage

Attestations:

File details

Details for the file chronovoyage-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: chronovoyage-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 28.0 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 215357ed88e5ea1a79840d62652878224fe68df2ab6f5534f52812e5c2199fe3
MD5 cefcbaa7956e3f46b63ebd245b0e8566
BLAKE2b-256 76dd4afb149c7a5e09575ea46ddd27880f70565ec6d37d9307bad72c97590488

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronovoyage-0.1.7-py3-none-any.whl:

Publisher: publish.yml on fairy-select/chronovoyage

Attestations:

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