Simple migration framework / infra-structure for SQL-based databases.
pip install migratoreHOST=${HOST} DB=${DB_NAME} USERNAME=${DB_USER} PASSWORD=${DB_PASS} migratore upgradeHOST- 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/db
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 databasetrace [id]- Prints the traceback for the error execution with the provided idrebuild [id]- Run the partial execution of the migration with the given idupgrade [path]- Executes the pending migrations using the defined directory or currentskip [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
database = Migratore.get_database()
table = database.get_table("users")
table.add_column("username", type = "text")Migratore is currently licensed under the Apache License, Version 2.0.
