syu93/db-versioning

DBVersioning 是一个用于帮助与本地数据库一起工作的团队的数据库版本控制工具。

0.0.1.beta 2016-05-02 11:09 UTC

This package is not auto-updated.

Last update: 2024-09-20 19:55:40 UTC


README

    ____  ____ _    __               _             _            
   / __ \/ __ ) |  / /__  __________(_)___  ____  (_)___  ____ _
  / / / / __  | | / / _ \/ ___/ ___/ / __ \/ __ \/ / __ \/ __ `/
 / /_/ / /_/ /| |/ /  __/ /  (__  ) / /_/ / / / / / / / / /_/ / 
/_____/_____/ |___/\___/_/  /____/_/\____/_/ /_/_/_/ /_/\__, /  
                                                       /____/   version 0.0.1

DBVersioning - 基于PHP的数据库版本控制

安装

从github克隆DBVersioning

    $ git clone https://github.com/syu93/DBVersioning.git

注意: 要全局安装,请将 bin/dbversioningdbversioning.php 脚本复制到您的bin文件夹中:/usr/local/bin

完成安装。只需运行

    $ php dbversioning.php [commands] [options]

或者如果您已经全局安装了它

    $ dbversioning [commands] [options]

注意:dbv/data/meta 文件夹添加到您的 ..gitignoire 或任何源管理系统中。以及 /dbv/data/dbv.json

用法

我们假设您正在使用两种安装方法中的一种。因此,我们省略了命令之前的工具名称。有关更多信息,请参阅上述说明。

    $ command [options] [arguments]
    $ command -H for help.

例如

    $ dbversioning init -H

将打印

Usage:
    init [options]
Options:
  -d    Database name.
  -h    Server host name. Default: localhost.
  -u    Database user. Default: root.
  -p    Database password.
  -t    [optional] The table to export.
  -T    [optional] The list of table to export
  --path  [optional] The dbv folder path. Default: dbv
Help:
    The init command initialize DBVersioning by reading and saving database records in the 'dbv/data/records/table_name.json'.

选项

    -v          Display the application version.

    -h, --help  Display this help message.

以下命令目前受支持

    init    Initialize DBVersioning by reading and saving records.

    update      Update saved records

    diff    Create the revision file to update the database