Skip to main content

Migratore Infra-structure

Project description

Migratore

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 migration
  • PORT - TCP port to be used in the connection with the database system
  • UNIX_SOCKET - Filesystem path to the UNIX socket file to be used in connection
  • DB - Name of the database used as the migration target
  • USERNAME - Username for authentication in the database
  • PASSWORD - Password to be used for authentication in the database
  • FS - Base file system path for file migration (may depend on migration context)
  • DB_URL - The database connection URL following the format protocol://username:password@host:port/db
  • SAFE - If the migration operation should be performed in a safe manner.

Commands

  • help - Prints a help message about the CLI interface
  • version - Prints the current version of migratore
  • environ - Displays the current environment in the standard output
  • list - Lists the executed migrations on the current database
  • errors - Lists the various errors from migration of the database
  • mark - Marks the associated data source with the current timestamp
  • trace [id] - Prints the traceback for the error execution with the provided id
  • rebuild [id] - Run the partial execution of the migration with the given id
  • touch [id] - Touches a migration file updating its timestamp to the current time
  • squash [start] [end] <output> - Combines multiple migrations into a single file
  • upgrade [path] - Executes the pending migrations using the defined directory or current
  • dry_upgrade [path] - Prints the pending migrations without executing them
  • skip [path] - Skips the current migration (next to be run) using the defined directory or current
  • generate [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

Build Status Coverage Status PyPi Status License

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

migratore-0.8.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

migratore-0.8.0-py2.py3-none-any.whl (22.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file migratore-0.8.0.tar.gz.

File metadata

  • Download URL: migratore-0.8.0.tar.gz
  • Upload date:
  • Size: 18.0 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

Hashes for migratore-0.8.0.tar.gz
Algorithm Hash digest
SHA256 ae25652562f7f8f1fae045f5a87de3721f49b6dabf0e0c8c08020b7f0897550e
MD5 131b1b9d6cb19c3be3b0daeea3b96ce7
BLAKE2b-256 3abe164252c914e87b140780318c951ef159e9da3bec929eeb02ddbbb9e205fd

See more details on using hashes here.

File details

Details for the file migratore-0.8.0-py2.py3-none-any.whl.

File metadata

  • Download URL: migratore-0.8.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.1 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

Hashes for migratore-0.8.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a5ffb13af5678e08dcd23dbfc92c10423010d895db83b8d7738e3c145ac22e42
MD5 5f49e33339eb33c55d3f7e6ba4f806b7
BLAKE2b-256 0a98a0fb92fbd52e1953ef511c2124e243fd26fb3ce4732fb921f88714fdd3b2

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