承接 headsnet/doctrine-db-copy-bundle 相关项目开发

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

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

headsnet/doctrine-db-copy-bundle

最新稳定版本:v0.1.2

Composer 安装命令:

composer require headsnet/doctrine-db-copy-bundle

包简介

Copy Doctrine databases without requiring mysqldump

README 文档

README

This bundle provides a Symfony command to copy an entire database schema, without any dependency on database client binaries such as mysqldump or mysql.

The primary use case is for duplicating a test database for use with Paratest in CI, where access to the database binaries is not possible, for example due to them being inside a Docker container that only exposes the MySQL port 3306.

This solution is significantly faster than dumping an SQL file and then importing it.

Installation

composer require --dev headsnet/doctrine-db-copy-bundle

If you use Symfony Flex you don't need to configure anything further.

Otherwise, add the following line to your bundles.php file:

return [
    ...
    Headsnet\DoctrineDbCopyBundle\HeadsnetDoctrineDbCopyBundle::class => ['dev' => true, 'test' => true],
    ...
];    

Usage

To copy test_1 to test_2, simply run:

bin/console headsnet:copy-db <src-db> <dest-db>

To create multiple test database copies, you can use a for loop:

PARATEST_THREADS=6

for (( i = 2; i <= $PARATEST_THREADS; i++ )); do
    bin/console headsnet:copy-db test_1 test_$i;
done

Licence

This code is released under the MIT licence. Please see the LICENSE file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 未知