2017 © Pedro Peláez
 

library dbvc

Database version control

image

jasny/dbvc

Database version control

  • Thursday, December 10, 2015
  • by jasny
  • Repository
  • 3 Watchers
  • 14 Stars
  • 2,303 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 9 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

DBVC

The dbvc commandline tool allows you to manage your database schema updates in your version control (git) repository., (*1)

Configuration

DBVC looks for the dbvc.json configuration file., (*2)

{
  "db": {
    "driver": "mysql",
    "host": "localhost",
    "username": "root",
    "password": "open",
    "dbname": "foobar"
  },
  "datadir": "dev",
  "vcs": "none"
}

If datadir is omitted, it defaults to "dev". If vcs is omitted, the vcs is automatically determined., (*3)

Supported database interfaces

  • mysql

You may issue a feature request to support other DBMSs., (*4)

Supported version control systems

  • git
  • none

You may issue a feature request to support other VCSs., (*5)

When using git, the correct order of the updates is automatically found by examining the git log., (*6)

When selecting vcs 'none', updates are run in natural order. It's up to you to prefix the update files with (for instance) a date, to make sure that run in the correct order, (*7)

Usage

Show a list of commands, (*8)

dbvc help

Show help on a specific command, (*9)

dbvc help init

Initialise DBVC for an existing database., (*10)

dbvc init

Create a database dump. This is used to create the DB on a new environment., (*11)

mysqldump foobar > dev/schema.php

Create the DB using the schema., (*12)

dbvc create

Add an update file. These are used to update the DB on other environments., (*13)

echo 'ALTER TABLE `foo` ADD COLUMN `status` BOOL DEFAULT 1;' > dev/updates/add-status-to-foo.sql

Mark an update as already run., (*14)

dbvc mark add-status-to-foo

Show a list of updates that need to be run., (*15)

dbvc status

Show all updates with their status., (*16)

dbvc status --all

Update the database., (*17)

dbvc update

The Versions

10/12 2015

dev-master

9999999-dev http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning

31/07 2014

v0.1.4

0.1.4.0 http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning

02/06 2014

v0.1.3

0.1.3.0 http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning

13/05 2014

v0.1.2

0.1.2.0 http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning

01/05 2014

v0.1.1

0.1.1.0 http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning

25/04 2014

v0.1.0

0.1.0.0 http://jasny.github.com/dbvc

Database version control

  Sources   Download

MIT

The Requires

 

database git mysql db vcs versioning