ffmigration

Simple Forward-only database migrations
Download

ffmigration Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Publisher Name:
  • Ferran Pegueroles Forcadell
  • Publisher web site:
  • http://www.pegueroles.com/

ffmigration Tags


ffmigration Description

Simple Forward-only database migrations ffmigration is a simple database migration tool.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 worksffmigration 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.sql0002_add_some_data.sql0003_create_index.sql0004_other_useful_tweaks.sqlInstallingUse setup.py:python setup.py buildsudo python setup.py installor use pip:pip install ffmigrateCommand line ./ffmigration --helpUsage: ffmigration database migrations_dirApply database migrations from migrations_dir to selected database.migration_dir contains files with .sql extension, that are sortedand applied.The applied migrations are saved on a table named 'migration_history'in the selected databaseOptions: --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. Requirements: · Python Limitations: · By now it only works with MySQL.


ffmigration Related Software