定制 davidburger/pgup 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

davidburger/pgup

Composer 安装命令:

composer require davidburger/pgup

包简介

PHP PostgreSQL database migration tool

README 文档

README

Useful for synchronization of database changes within development team.

Installation

composer require davidburger/pgup

Prerequisities

  • psql client must be installed
# debian/ubuntu: 
sudo apt-get install postgresql-client
  • PDO_PGSQL driver is required for sync_mode = 'database'

Setup

  • if <project_root>/migrations folder does not exist, it will be created with initial config file
cd <project_root>
./vendor/bin/pgup
  • edit database credentials in <project_root>/migrations/config/global.php

Basic principles

  • password for individual hosts are stored in ~.pgpass - see http://www.postgresql.org/docs/9.5/interactive/libpq-pgpass.html
  • if ~/.pgpass does not exist, it is created automatically
  • sql files could be successfully processed only once for given environment - they are checked for their equivalent stored in "applied" folder (sync_mode = filesystem) or in the database table "migration" (sync_mode = database)
  • output is written to the path defined by 'log_dir' configuration variable

Usage

  • create empty sql migration file from template:
php vendor/bin/pgup create --comment="add_new_table"
  • process migration files:
php vendor/bin/pgup
  • process migration files for specific environment:
php vendor/bin/pgup --env=development

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-05-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固