https://github.com/hicknhack-software/QSqlMigrator
A library to help you keep track of database schema migrations. This tool is inspired by Ruby on Rails ActiveRecord migrations.
Features:
- builtin support for tables, columns and indices
- you can build custom commands
- easy api
- everything is tested
- database specific driver plugins (includes: PostgreSql, MySql and Sqlite)
QSqlMigrator is meant to be used with the Qt Framework. It has been successfully tested with:
Windows:
- Visual Studio 2010, Qt 4.8.5 and Qt 5.2.1
- Visual Studio 2012, Qt 5.2.1
- Visual Studio 2013, Qt 5.2.1
- MinGW provided with Qt 5.2.1
Linux:
- GCC 4.8.0 with Qt 4.8.5 and Qt 5.0.2
- CLANG 3.3 with Qt 4.8.5 and Qt 5.0.2
- MinGW 4.8.1 with Qt 4.8.5
You need the working database driver plugin for your database, both for Qt and the SqlMigrator. Hint: Our tests include instructions to create the Qt SQL driver plugins.
All tests are tied to the appropriate source modules. They will run automatically after they have been built and therefore the build will fail if the tests do not run successfully. (You can easily disable tests if you want to hack away) Some tests require configuration options to access the database under test.