Skip to main content

Database migration helper

Project description

Tormor Command Line Tool

PyPI version CircleCI Coverage Status

Tormor is a command line tool for migrating database. To use Tormor, please first ensure these requirements:

  • Postgresql has been installed
  • Postgresql can be accessed using command :
    $ psql
    
  • SCHEMA_PATH has been specified

Installation

Tormor requires Python 3.5 or later to run. Tormor can be installed using pip:

$ pip install git+https://github.com/Proteus-tech/tormor.git@pytest_asyncpg_dryrun

Instruction

$ tormor [opts] command [args]

For more information, please use command:

$ tormor --help

Enabling Modules

enable-modules command receives module name as a parameter to be enabled and later migrated using migrate command.

$ tormor enable-modules module-to-be-migrated

Migrate

migrate command executes sql files under the enabled modules. To start migration, use the following command:

$ tormor migrate

To simply output migration sql queries without executing them, use the following command.

$ tormor migrate --dry-run

Run a Script File

include command takes filename as a parameter allows tormor commands to be run in a script, each line at a time.

$ tormor include filename

Execute SQL File

sql command takes filename as a parameter and load and execute the query inside it.

$ tormor sql filename

Dev

Requirements

  • flit
  • PostgreSQL
pip install flit
flit install
./runtests

Publish to PyPI

flit publish

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

tormor-2.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

tormor-2.2-py2.py3-none-any.whl (25.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tormor-2.2.tar.gz.

File metadata

  • Download URL: tormor-2.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for tormor-2.2.tar.gz
Algorithm Hash digest
SHA256 2367ab154236e4b7a1da3c9328ff73e1faf90ac74b995d048460fea01630d3e6
MD5 d8e216111d39925a717bde12150983ae
BLAKE2b-256 bcccb4a94d5c8d8ea135b43e3366153c6bce5b86580b1c62bae6ac5ab2fe1901

See more details on using hashes here.

File details

Details for the file tormor-2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: tormor-2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for tormor-2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d38307088ead23525550dbc184612e72f673f123c8cd1557b6728acdc84443de
MD5 a9ef9b88efb21b2f118b021361b6332d
BLAKE2b-256 7ac68a1ec72d8cf91a9510dc89167eab42b8bf92808857d09ad977d7cfbeddf7

See more details on using hashes here.

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