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.1.tar.gz (626.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chronovoyage-0.2.1.tar.gz
  • Upload date:
  • Size: 626.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.2.1.tar.gz
Algorithm Hash digest
SHA256 e8f7a750a782df3be4ca70c56ae47378fb4655133bc8268ec105ca99cbadb915
MD5 ec9fb20f2c4ad08ad59d377325c3b68c
BLAKE2b-256 21de52b075e41e062998cbfc69b77e98ea283757c6967cc05e79e2d7df80c652

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

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

File metadata

  • Download URL: chronovoyage-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 28.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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af457f63c34bd9c1dea695fd69f0511fe5ad7b3f91bf12d6298d6875d2ee56cd
MD5 9c4a7ad10c3b3f82e265681bf47f263d
BLAKE2b-256 d695349145937d59c8d026a26dcd2b47d175db61d5e18701e3b780aa2eae0919

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronovoyage-0.2.1-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