承接 macwinnie/wp-db-phinx-helper 相关项目开发

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

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

macwinnie/wp-db-phinx-helper

最新稳定版本:1.0.0

Composer 安装命令:

composer require macwinnie/wp-db-phinx-helper

包简介

Helper for WordPress plugins to be able to use [Phinx](https://phinx.org/) for DB migrations

README 文档

README

This helper allows you to use Phinx for defining Database migrations. The placed config file phinx.php will use the Wordpress Configured Database.

You can install this helper library by using composer:

composer require macwinnie/wp-db-phinx-helper

It is recommended to expand the Macwinnie\WpDbPhinxHelper\DBUtilisator class by your Plugin-Class:

class MyPlugin extends DBUtilisator {

    public static function plugin_activation_method () {
        parent::plugin_activation_method(); # ensures Phinx config placed and migrations run on install / activation / update
    }

    public static function plugin_uninstall_method () {
        parent::plugin_uninstall_method(); # ensures Phinx migrations rolled back in Database on Plugin uninstall
    }
}

The static function static::basePath() can be used to get your Plugin absolute path on the webserver – and will also check if the Phinx config file is present in the base directory of your Plugin.

Folder structure

Your Database migrations shall reside within db/migrations, Database seeds within db/seeds as childpath of your WordPress plugin.

Phinx takes over creation of paths as you follow the official documentation. The phinx executable can be found in vendor/bin/phinx as you install this helper library via composer.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固