kerrialn/indoctrinate
最新稳定版本:v0.1.6
Composer 安装命令:
composer require kerrialn/indoctrinate
包简介
An automated package helps you align your database with Doctrine or simply fix database issues.
README 文档
README
An automated package helps you align your database with Doctrine or simply fix database issues.
Installation
composer require kerrialn/indoctrinate
Configuration
create config/indoctrinate.php in the root directory of your project.
<?php return static function (DbFixerConfig $config): void { $config->connection( driver: 'mysql', host: '127.0.0.1', port: 3306, dbname: 'IM_A_DATABASE_NAME, user: 'happy_user', password: '12345678', ); $config->rules([ EnsureAutoIncrementPrimaryKeyRule::class => new EnsureAutoIncrementPrimaryKeyRuleConstraints( false, false, [], ['default_ci_sessions', '%session%', '%cache%', '%temp%', '%tmp%'], 500000, true, false ), ]); };
If you want to register indiviual rule constraints, you can do so like this:
$config->rules([ EnsureAutoIncrementPrimaryKeyRule::class => new EnsureAutoIncrementPrimaryKeyRuleConstraints( false, false, [], ['default_ci_sessions', '%session%', '%cache%', '%temp%', '%tmp%'], 500000, true, false ), ]);
Usage
php bin/indoctrinate fix
php bin/indoctrinate fix --dry
Options
--log=<log-dir>
统计信息
- 总下载量: 155
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-13