Skip to main content

Simple 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.3.0.tar.gz (626.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronovoyage-0.3.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chronovoyage-0.3.0.tar.gz
  • Upload date:
  • Size: 626.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronovoyage-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cc09a991fa54a02dc495f1751bae478f30c36cfb6e94e5b079bd7aca49c011bc
MD5 ed0bdec965ae77d6b32c2c041441f983
BLAKE2b-256 5e41ba63270e799e56a41eaf8add6f23564d4e545509edb9c1a9d968e3624a5b

See more details on using hashes here.

Provenance

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

Publisher: publish-pip-package.yml on fairy-select/chronovoyage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: chronovoyage-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronovoyage-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9606dcb71caee9387d8c8a670dabf7567f968be7dfb142045779cc79a720a7a6
MD5 b085557aaf76b36109620e532f448797
BLAKE2b-256 4a96868551eef87223f6e19940b5feab7c8dc671704cf540cca6e3f1ea71319c

See more details on using hashes here.

Provenance

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

Publisher: publish-pip-package.yml on fairy-select/chronovoyage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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