vcs4sql

Organizing version control for the database(s) in a simple, elegant way.

MIT License

Downloads
5.6K
Stars
3
Committers
1

In the last few years, version control for database became best practice. There are several implementations/ways for ruby, however, most of them are focused/dependent on particular frameworks that restrict the migration outside the framework. vcs4sql allows organizing version control for the database(s) in a simple, elegant and lightweight way without any dependencies on existing frameworks.

The main idea is to keep changes as simple as possible and be able to have full control of the database structure without hidden frameworks "magic". Initial PoC is designed for sqlite.


Quick start

$ gem install vcs4sql
# Define the database migration scripts
$ tree
.
├── bin
├── Gemfile
├── Guardfile
├── Rakefile
├── ...
   ├── ...
├── sqlite.db
├── ...
└── upgrades
    └── sqlite
        ├── 001-install-main-tables.sql
        ├── 002-add-missing-indexes.sql
        ├── 003-add-missing-foreigh-keys.sql
        ├── ...
        └── 999.testdata.sql
require "vcs4sql"
 
Vcs4sql::Sqlite::Migration.new "sqlite.db"
                          .upgrade "upgrades/sqlite"

The scripts will be executed in a natural order based on name, so far.

Support

If you want to report a bug, or have ideas, feedback or questions about the gem, let me know via GitHub issues and I will do my best to provide a helpful answer. Happy hacking!

License

The gem is available as open source under the terms of the MIT License.

Code of conduct

Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Contribution guide

Pull requests are welcome!

Package Rankings
Top 29.89% on Rubygems.org
Badges
Extracted from project README
Gem Version License: MIT Commit activity Downloads Maintainability EO badge