承接 smalldb/libchangelog_sql 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

smalldb/libchangelog_sql

Composer 安装命令:

composer require smalldb/libchangelog_sql

包简介

Changelog.SQL is simple and elegant tool to maintain database changes. This package is a library meant to be integrated into your project

README 文档

README

Changelog.SQL is simple tool to maintain changes in database. It is based on directory of SQL scripts and simple SQL table where are recorded already executed scripts.

This package contains a library meant to be integrated into your project. Just initialize whatever framework you use and call Smalldb\ChangelogSql\CliMain::main()`.

See cascade plugin changelog_sql for usage example.

Usage

When database is modified, place SQL script which performs this modification into app/database/changelog.sql directory and commit it. This script will remain there forever.

After deploy on a server run your changelog-sql script and you will see SQL code required to reproduce all changes on the server.

@warning You must set your client to stop on errors. Otherwise things go bad.

@note The Trick: Each file has simple insert at its end. This insert records successful execution of given script into database. Filename specified in this insert must match filename of the script.

Example of the Script

ALTER ... whatever you need;
UPDATE ... data that needs to be modified;

--
INSERT INTO `about_changelog`
SET `filename` = '0000-00-00-about_changelog.sql';

@warning Do not forget final semicolon (;).

Init scripts

In app/database/changelog.sql/init directory can be placed scripts which should be executed every time something is changed in database.

License

The most of the code is published under Apache 2.0 license. See LICENSE file for details.

Contribution guidelines

There is no bug tracker yet, so send me an e-mail and we will figure it out.

If you wish to send me a patch, please create a Git pull request or send a Git formatted patch via email.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固