Giter Site home page Giter Site logo

dgroup / vcs4sql Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 80 KB

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

License: MIT License

Ruby 96.26% Shell 0.37% TSQL 3.36%
vcs ruby sql sqlite changelog changeset database-management database-control liquibase gem

vcs4sql's Introduction

Gem Version License: MIT Commit activity Hits-of-Code Downloads

Build status circleci 0pdd Dependency Status Maintainability

DevOps By Rultor.com EO badge

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!

vcs4sql's People

Contributors

dgroup avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vcs4sql's Issues

todo.yml:7-8: There a lot of badges in readme which...

The puzzle DEV-0cebd13d from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 7 to 8 in 91467f3

# @todo #/DEV There a lot of badges in readme which aren't enabled for now.
# Let's enable them.

The puzzle was created by @dgroup on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

todo.yml:10-11: Publish a gem to the rubygems.org. Add...

The puzzle DEV-f11c7ae3 from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 10 to 11 in 91467f3

# @todo #/DEV Publish a gem to the rubygems.org. Add this instructions to the @Rultor.
# No manual actions required.

The puzzle was created by @dgroup on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

todo.yml:1-2: Enable Travis CI as second CI server once...

The puzzle DEV-1214b7cd from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 1 to 2 in 91467f3

# @todo #/DEV Enable Travis CI as second CI server once the project
# became a public. This might be alternative for Circle CI (just in case)

The puzzle was created by @dgroup on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

applied.rb:56-58: Add verification that connection not a...

The puzzle DEV-41a82912 from #DEV has to be resolved:

# @todo #/DEV Add verification that connection not a null, throw error
# with proper error code in order to explain the problem.
# Potentially we need to define the class with error codes.

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

todo.yml:4-5: Explain in readme.md how to use the...

The puzzle DEV-7f4f0ad5 from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 4 to 5 in 91467f3

# @todo #/DEV Explain in readme.md how to use the project,
# add more instructions and generic guide.

The puzzle was created by @dgroup on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

applied.rb:47-48: Add verification of array usage over...

The puzzle DEV-4e0c8599 from #DEV has to be resolved:

# @todo #/DEV Add verification of array usage over index.
# The changelog shouldn't be a null.

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

expected.rb:63-65: Raise an exception in case if any of...

The puzzle DEV-b96fff30 from #DEV has to be resolved:

# @todo #/DEV Raise an exception in case if any of arguments are null or
# empty. Potentially we may add verification of the type, but this is
# optional.

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

todo.yml:13-14: Migrate to ruby 2.7.0. For now the...

The puzzle DEV-dab00982 from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 13 to 14 in 91467f3

# @todo #/DEV Migrate to ruby 2.7.0. For now the project has 2.6.5.
# The project is new, it shouldn't be so expensive.

The puzzle was created by Yurii Dubinka on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

migration.rb:63-65: Lock the upgrade procedure in order...

The puzzle DEV-20cb5df8 from #DEV has to be resolved:

# @todo #/DEV Lock the upgrade procedure in order to avoid the cases
# when multiple processes are going to modify/upgrade the same database
# schema. No concurrent upgrades is allowed so far.

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

todo.yml:16-34: Think about support of Postgres, MySQL,...

The puzzle DEV-7d90d09b from #DEV has to be resolved:

vcs4sql/todo.yml

Lines 16 to 34 in 91467f3

# @todo #/DEV Think about support of Postgres, MySQL, Oracle and others.
# We need to reuse the existing structure as much as we can.
# Most of classes which are oriented on SQLite should be modified.
# The structure of potential upgrade folder might be the following
# ...
# |- lib
# |- test
# |- upgrade
# ||||- sqlite
# ||||||||- 00-define-initial-structure.sql
# ||||||||- 02-add-missing-foreign-keys.sql
# ||||||||- 03-add-missing-indexes.sql
# ||||||||- 99-add.testdata.sql
# ||||- postgres
# ||||||||- ...
# |||||- mysql
# ||||||||- ...
# |- Gemfile
# ...

The puzzle was created by Yurii Dubinka on 16-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

changelog.rb:39-41: Raise the exception in case if -...

The puzzle DEV-ca77ad7c from #DEV has to be resolved:

# @todo #/DEV Raise the exception in case if
# - this.* are empty or null
# - conn is empty or null

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

migration_test.rb:73-75: The test should simulate the...

The puzzle DEV-997a1e22 from #DEV has to be resolved:

# @todo #/DEV The test should simulate the case when change set was applied to
# database, then someone have changed the file accidentally, committed the
# changes, and migration was triggered in prod.

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

changelog.rb:43-46: Wrap the sql's execution to separate...

The puzzle DEV-b327c8c7 from #DEV has to be resolved:

# @todo #/DEV Wrap the sql's execution to separate blocks which will:
# - catch the error
# - provide the detailed description
# - populate the error code

The puzzle was created by @dgroup on 15-Jan-20.

role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.