kerrialn/indoctrinate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kerrialn/indoctrinate

最新稳定版本:v0.1.9

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 --dev

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
        ),
    ]);

Available Rules & Sets

See RULES.md for the full list of available rules and sets.

To regenerate it after adding new rules:

php bin/indoctrinate docs

Usage

php bin/indoctrinate fix

php bin/indoctrinate fix --dry

php bin/indoctrinate fix --report

Options

--log=<log-dir>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-13