ffmigration stands for “fast forward migration” and is a simple database migration program.
Is a simple ans elegant way of keeping database migrations in order in various environemnts, keeping track of wich database migratison are executed and with none.
ffmigration is a forward only migration tool, it means that there isnt ant automatic way to rollback and applied migration.
How it works
ffmigration creates a table names migration_history on the selected database to keep track od the applied migrations. This table is created automatically on first run.
On every run, ffmigration looks to all the files with a .sql extension in the migration directory provided in the command line, checks if the migration file has been applied to the database, and if ih has not been aplied it is apllied to the the database and saved to migration_history.
It is recomended to name all the migration files prefixed with a number to keep the order. For example:
$ ls /some/migrations/dir/ 0001_create_some_table.sql 0002_add_some_data.sql 0003_create_index.sql 0004_other_useful_tweaks.sql
Limitations
This is a beta software with some limitations:
By now it only works with MySQL.
Installing
Use setup.py:
python setup.py build sudo python setup.py install
or use pip:
pip install ffmigrate
Command line
$ ./ffmigration --help
Usage: ffmigration [options] database migrations_dir
Apply database migrations from migrations_dir to selected database.
migration_dir contains files with .sql extension, that are sorted
and applied.
The applied migrations are saved on a table named 'migration_history'
in the selected database
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-H HOST, --host=HOST Database server hostname
-u USER, --user=USER database username
-p ask for a database password
--password=PASSWORD database password
-P PORT, --port=PORT database connection port
-q, --quiet don't print status messages to stdout
-l LEVEL, --level=LEVEL
logging level (debug,info,warning,error,critical)
-n, --noop Do not run commands.
Metadata
Release files for ffmigration 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ffmigration-0.5.1.tar.gz | 5.7 kB | Without provenance | Details |
Release files / ffmigration-0.5.1.tar.gz
| Download URL | ffmigration-0.5.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ac4ea00059bed534b861703a387e2d5674e07cf49bb292a38c926b008a9002e
|
|
BLAKE2b-256 checksum How to use checksums |
ce4827f5c3ce3bc275c660e31410def5a1b51499ab74cc0fd8f209eeb1a79614
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ffmigration 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.