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
MigrationVin 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
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2024-03-15