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.2.0rc3.tar.gz (626.3 kB view details)

Uploaded Source

Built Distribution

chronovoyage-0.2.0rc3-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file chronovoyage-0.2.0rc3.tar.gz.

File metadata

  • Download URL: chronovoyage-0.2.0rc3.tar.gz
  • Upload date:
  • Size: 626.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chronovoyage-0.2.0rc3.tar.gz
Algorithm Hash digest
SHA256 e436518030ef71a459a27747fd372d0b312c359f57337e902b059f5a7291555c
MD5 2068b15c305c25f5074a2cecee473599
BLAKE2b-256 bd24ff65fda67f870fc8c89d4b466a49a92fa90e579312cabd179a9b3d8eb571

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

Details for the file chronovoyage-0.2.0rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for chronovoyage-0.2.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 85ca842c80be9e79233ae16ab421503c6a971ff7522f56c6a6908742df021565
MD5 754c5a9c7a7eee0d7bbd4db22c224fc5
BLAKE2b-256 5544821104a36903775d20648932dac2632a6fa8651e4e5738f2135877480f47

See more details on using hashes here.

Provenance

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

Publisher: publish-pip-package.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