Migratore Infra-structure
Project description
Simple migration framework / infra-structure for SQL-based databases.
Installation
pip install migratore
Execution
HOST=${HOST} DB=${DB_NAME} USERNAME=${DB_USER} PASSWORD=${DB_PASS} migratore upgrade
Variables
HOST- Hostname or IP address of the database system for migrationPORT- TCP port to be used in the connection with the database systemUNIX_SOCKET- Filesystem path to the UNIX socket file to be used in connectionDB- Name of the database used as the migration targetUSERNAME- Username for authentication in the databasePASSWORD- Password to be used for authentication in the databaseFS- Base file system path for file migration (may depend on migration context)DB_URL- The database connection URL following the formatprotocol://username:password@host:port/dbSAFE- If the migration operation should be performed in a safe manner.
Commands
help- Prints a help message about the CLI interfaceversion- Prints the current version of migratoreenviron- Displays the current environment in the standard outputlist- Lists the executed migrations on the current databaseerrors- Lists the various errors from migration of the databasemark- Marks the associated data source with the current timestamptrace [id]- Prints the traceback for the error execution with the provided idrebuild [id]- Run the partial execution of the migration with the given idtouch [id]- Touches a migration file updating its timestamp to the current timesquash [start] [end] <output>- Combines multiple migrations into a single fileupgrade [path]- Executes the pending migrations using the defined directory or currentdry_upgrade [path]- Prints the pending migrations without executing themskip [path]- Skips the current migration (next to be run) using the defined directory or currentgenerate [path]- Generates a new migration file into the target path
Examples
database = Migratore.get_database()
table = database.get_table("users")
table.add_column("username", type = "text")
License
Migratore is currently licensed under the Apache License, Version 2.0.
Build Automation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
migratore-0.9.2.tar.gz
(18.1 kB
view details)
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 migratore-0.9.2.tar.gz.
File metadata
- Download URL: migratore-0.9.2.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e75b9def0e175d299b24c473adc377ce1ebac65216c3917fa77e7eac708794b
|
|
| MD5 |
822772c4581885f81d49dde7ba7d8a46
|
|
| BLAKE2b-256 |
f3f75a2c5bd7bc9d9f42dfa73c5ad8dc34c2b56b4dfa3b51e42cae706d409a10
|
File details
Details for the file migratore-0.9.2-py2.py3-none-any.whl.
File metadata
- Download URL: migratore-0.9.2-py2.py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2d49ba540ad71c3ead0aac9e92faa4ba8bf35c31b5c710a44dc5b5a16fccb71
|
|
| MD5 |
32ff622ca4d447a65fcaa8a75a61a75b
|
|
| BLAKE2b-256 |
78c88cc7e5ffbb07ddd8cebf7752bd3df5e50ab25db05c5ef37c2f919a34f2cb
|