承接 skipthedragon/wp-migrations 相关项目开发

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

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

skipthedragon/wp-migrations

Composer 安装命令:

composer require skipthedragon/wp-migrations

包简介

Doctrine like Migrations in WordPress.

README 文档

README

Heavily inspired by Symfony/Doctrine migrations, this package provides a simple way to manage your WordPress database schema and data.

Installation

 composer require skipthedragon/wp-migrations

Pre-requisites

This package requires:

  • wpdb (WordPress database)
  • at least PHP 8.1

Prerequisites

Migrations must:

  • be in the migration folder that you specified in the config
  • have a unique timestamp in its name
  • implement the Migration interface (WpMigrations\Architecture\Migration)
  • have MigrationV in its name

Usage

To run the migrations, you can use the following code:

 use WpMigrations\service\MigrationManagerService;
 
 $config = new \WpMigrations\Architecture\MigrationConfig(
        'path/to/migrations',
        'WpMigrations\\Migrations\\',
        'my_plugin_name'
 );
 
 $migrationManagerService = new MigrationManagerService($config);
 $migrationManagerService->migrate();

Check the migrate() method in service/MigrationManagerService.php for more options and types of migration.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-03-15