承接 jinnguyen/puja-migration 相关项目开发

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

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

jinnguyen/puja-migration

Composer 安装命令:

composer require jinnguyen/puja-migration

包简介

Puja-Migration is a database migration php library, supports both file sql and php

README 文档

README

Puja-Migration is a database migration php library, supports both file sql and php

Install:

composer require jinnguyen/puja-migration

Usage:

include '/path/to/vendor/autoload.php';
use Puja\Migration\Migrate;

Example:

// Configure DB
use Puja\Db\Adapter;

new \Puja\Db\Adapter(array(
    'write_adapter_name' => 'master',
    'adapters' => array(
        'default' => array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '123',
            'dbname' => 'fwcms',
            'charset' => 'utf8',
        ),
        'master' => array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '123',
            'dbname' => 'fwcms',
            'charset' => 'utf8',
        )
    )
));

// configure migration
new \Puja\Migration\Migrate(array(
    'table' => 'puja_migration', // db table name that store migration tracking information
    'dir' => __DIR__ . '/migrations/', // the folder store migration files
    'create_table' => true, // if true, the query "CREATE TABLE <table>" will run, should enable at the first time and disable from second time.
));

Note*

1. THE ORDER OF MIGRATION FILES ARE VERY IMPORTANT


So pls follow the file name conversation: - The name should begin by a numeric, e.g: 0-launched-project.sql, 1-update.sql, 2-data-fix.php,....
As above example,  0-launched-project.sql is  run first then 1-update.sql then 2-data-fix.php

2. The php files are not show log message as default, if you want to show the log message you can use $this->addStament('Message'); // check in demo/3.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache
  • 更新时间: 2017-01-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固