Database migration helper
Project description
Tormor Command Line Tool
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2367ab154236e4b7a1da3c9328ff73e1faf90ac74b995d048460fea01630d3e6
|
|
| MD5 |
d8e216111d39925a717bde12150983ae
|
|
| BLAKE2b-256 |
bcccb4a94d5c8d8ea135b43e3366153c6bce5b86580b1c62bae6ac5ab2fe1901
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d38307088ead23525550dbc184612e72f673f123c8cd1557b6728acdc84443de
|
|
| MD5 |
a9ef9b88efb21b2f118b021361b6332d
|
|
| BLAKE2b-256 |
7ac68a1ec72d8cf91a9510dc89167eab42b8bf92808857d09ad977d7cfbeddf7
|