承接 scriptburn/db-version-update 相关项目开发

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

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

scriptburn/db-version-update

Composer 安装命令:

composer require scriptburn/db-version-update

包简介

Package to update db structure acording to a target package version

关键字:

README 文档

README

##Usage:

Create a child class like this (A sample child class has been provided as sampleDbUpdateService.php): class DbUpdateService extends \Scriptburn\UpdateDb {

// will be called for target db version 1
public function update_routine_1()
{
    /* make sure to return true
    other wise db update will stop propogating
    and update process will run again
     */
    return true;
}
// will be called for target db version 2
public function update_routine_2()
{
    /* make sure to return true
    other wise db update will stop propogating
    and update process will run again
     */
    return true;
}

}

Next we will Call the actual function that checks if db update is needed. Best place for this code will be in a middleware // make sure composer.json has a key named dbversion in it $optionalVersionData=['type' => 'composer', 'path' => "/path/to/composer.json"];

$dbUpdateCheck = new App\Services\DbUpdateService(< instance of \ScriptBurn\Settings >, < instance of pdo connection >, $optionalVersionData);

//If you passed $optionalVersionData as 3rd parameter to App\Services\DbUpdateService constructor you do not need to pass current db version to method maybeUpdate as second parameter $dbUpdateCheck->maybeUpdate('scriptburn/git-auto-deploy',< optional current db version no >');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固