{
    "schema": 1,
    "mechanism": "actual-php-phinx-sqlite-recording",
    "createdAt": "2026-11-11T20:37:47+00:00",
    "runtime": {
        "php": "8.3.33",
        "os": "Windows",
        "sqlite": "3.53.2",
        "phinx": "0.16.12"
    },
    "scenarios": [
        {
            "id": "create",
            "title": "Новая таблица",
            "use": "Первое развёртывание CRM",
            "summary": "Создайте клиентов и проследите появление версии в журнале.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class CreateClients extends AbstractMigration\r\n{\r\n    public function change(): void\r\n    {\r\n        $this->table('clients')\r\n            ->addColumn('name', 'string', ['limit' => 120])\r\n            ->addColumn('email', 'string', ['limit' => 180])\r\n            ->addColumn('status', 'string', ['default' => 'new', 'limit' => 20])\r\n            ->create();\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [],
                "tables": [],
                "applied": [],
                "queryPlan": [],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [],
                        "tables": [],
                        "applied": [],
                        "queryPlan": [],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "create",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/create\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/create-testing.sqlite\nordering by creation time\n\n == 20261111090100 CreateClients: migrating \n == 20261111090100 CreateClients: migrated 0.0036s\n\nAll Done. Took 0.0167s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE `clients` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NULL, `email` VARCHAR(180) NULL, `status` VARCHAR(20) NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 0,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090100,
                                "migration_name": "CreateClients"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE `clients` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NULL, `email` VARCHAR(180) NULL, `status` VARCHAR(20) NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 0,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090100,
                                "migration_name": "CreateClients"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "create",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/create\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n     up  20261111090100  2026-11-11 23:37:48  2026-11-11 23:37:48  CreateClients\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE `clients` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NULL, `email` VARCHAR(180) NULL, `status` VARCHAR(20) NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 0,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090100,
                                "migration_name": "CreateClients"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE `clients` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NULL, `email` VARCHAR(180) NULL, `status` VARCHAR(20) NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 0,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090100,
                                "migration_name": "CreateClients"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "create",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/create\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/create-testing.sqlite\nordering by creation time\n\nAll Done. Took 0.0034s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE `clients` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NULL, `email` VARCHAR(180) NULL, `status` VARCHAR(20) NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 0,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090100,
                                "migration_name": "CreateClients"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "expand",
            "title": "Новое поле",
            "use": "Добавление телефона действующим клиентам",
            "summary": "Nullable-колонка не требует выдумывать телефоны старым клиентам. Откат убирает только добавленную колонку.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class AddContactPhone extends AbstractMigration\r\n{\r\n    public function change(): void\r\n    {\r\n        $this->table('clients')->addColumn('contact_phone', 'string', [\r\n            'limit' => 40, 'null' => true, 'default' => null,\r\n        ])->update();\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 3,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "expand",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/expand\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/expand-testing.sqlite\nordering by creation time\n\n == 20261111090200 AddContactPhone: migrating \n == 20261111090200 AddContactPhone: migrated 0.0041s\n\nAll Done. Took 0.0148s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `contact_phone` VARCHAR(40) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "contact_phone",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "contact_phone": null
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090200,
                                "migration_name": "AddContactPhone"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `contact_phone` VARCHAR(40) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "contact_phone",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "contact_phone": null
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090200,
                                "migration_name": "AddContactPhone"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "expand",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/expand\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n     up  20261111090200  2026-11-11 23:37:48  2026-11-11 23:37:48  AddContactPhone\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `contact_phone` VARCHAR(40) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "contact_phone",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "contact_phone": null
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090200,
                                "migration_name": "AddContactPhone"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `contact_phone` VARCHAR(40) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "contact_phone",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "contact_phone": null
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "contact_phone": null
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090200,
                                "migration_name": "AddContactPhone"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx rollback -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "expand",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/expand\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/expand-testing.sqlite\nordering by creation time\n\n == 20261111090200 AddContactPhone: reverting \n == 20261111090200 AddContactPhone: reverted 0.0088s\n\nAll Done. Took 0.0124s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "backfill",
            "title": "Данные и up/down",
            "use": "Подготовка поиска по email",
            "summary": "Исходное значение сохраняется; нормализованная копия вычисляется отдельно. Down удаляет производную колонку.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class BackfillEmailCopy extends AbstractMigration\r\n{\r\n    public function up(): void\r\n    {\r\n        $this->table('clients')->addColumn('email_normalized', 'string', ['null' => true])->update();\r\n        // Demo ASCII addresses only: SQL lower() is not a universal Unicode/email policy.\r\n        $this->execute('UPDATE clients SET email_normalized = lower(trim(email))');\r\n    }\r\n    public function down(): void\r\n    {\r\n        // Original email remains intact; the derived copy is disposable in this exercise.\r\n        $this->table('clients')->removeColumn('email_normalized')->update();\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 3,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "backfill",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/backfill\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/backfill-testing.sqlite\nordering by creation time\n\n == 20261111090300 BackfillEmailCopy: migrating \n == 20261111090300 BackfillEmailCopy: migrated 0.0047s\n\nAll Done. Took 0.0152s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `email_normalized` VARCHAR NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "email_normalized",
                                        "type": "VARCHAR",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "email_normalized": "anna@example.test"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "email_normalized": "boris@example.test"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "email_normalized": "vera@example.test"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090300,
                                "migration_name": "BackfillEmailCopy"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new', `email_normalized` VARCHAR NULL)"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    },
                                    {
                                        "cid": 4,
                                        "name": "email_normalized",
                                        "type": "VARCHAR",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new",
                                        "email_normalized": "anna@example.test"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active",
                                        "email_normalized": "boris@example.test"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new",
                                        "email_normalized": "vera@example.test"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090300,
                                "migration_name": "BackfillEmailCopy"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx rollback -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "backfill",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/backfill\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/backfill-testing.sqlite\nordering by creation time\n\n == 20261111090300 BackfillEmailCopy: reverting \n == 20261111090300 BackfillEmailCopy: reverted 0.0081s\n\nAll Done. Took 0.0117s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE \"clients\" (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` VARCHAR(120) NOT NULL, `email` VARCHAR(180) NOT NULL, `status` VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "index",
            "title": "Индекс и план",
            "use": "Поиск клиента в большой таблице",
            "summary": "Сравните SCAN и SEARCH в плане реального SQLite для 1003 строк. После rollback индекс исчезнет.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class AddEmailIndex extends AbstractMigration\r\n{\r\n    public function change(): void\r\n    {\r\n        $this->table('clients')->addIndex(['email'], ['name' => 'idx_clients_email'])->update();\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 1003,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            },
                            {
                                "id": 4,
                                "name": "Клиент 4",
                                "email": "user4@example.test",
                                "status": "new"
                            },
                            {
                                "id": 5,
                                "name": "Клиент 5",
                                "email": "user5@example.test",
                                "status": "new"
                            },
                            {
                                "id": 6,
                                "name": "Клиент 6",
                                "email": "user6@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 1003,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Клиент 4",
                                        "email": "user4@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 5,
                                        "name": "Клиент 5",
                                        "email": "user5@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 6,
                                        "name": "Клиент 6",
                                        "email": "user6@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "index",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/index\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/index-testing.sqlite\nordering by creation time\n\n == 20261111090400 AddEmailIndex: migrating \n == 20261111090400 AddEmailIndex: migrated 0.0051s\n\nAll Done. Took 0.0163s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "idx_clients_email",
                                "tbl_name": "clients",
                                "sql": "CREATE INDEX `idx_clients_email` ON `clients` (`email` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 1003,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "idx_clients_email",
                                        "unique": 0,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Клиент 4",
                                        "email": "user4@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 5,
                                        "name": "Клиент 5",
                                        "email": "user5@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 6,
                                        "name": "Клиент 6",
                                        "email": "user6@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090400,
                                "migration_name": "AddEmailIndex"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 3,
                                "parent": 0,
                                "notused": 62,
                                "detail": "SEARCH clients USING INDEX idx_clients_email (email=?)"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "idx_clients_email",
                                "tbl_name": "clients",
                                "sql": "CREATE INDEX `idx_clients_email` ON `clients` (`email` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 1003,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "idx_clients_email",
                                        "unique": 0,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Клиент 4",
                                        "email": "user4@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 5,
                                        "name": "Клиент 5",
                                        "email": "user5@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 6,
                                        "name": "Клиент 6",
                                        "email": "user6@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090400,
                                "migration_name": "AddEmailIndex"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 3,
                                "parent": 0,
                                "notused": 62,
                                "detail": "SEARCH clients USING INDEX idx_clients_email (email=?)"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx rollback -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "index",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/index\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/index-testing.sqlite\nordering by creation time\n\n == 20261111090400 AddEmailIndex: reverting \n == 20261111090400 AddEmailIndex: reverted 0.0073s\n\nAll Done. Took 0.0109s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 1003,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Клиент 4",
                                        "email": "user4@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 5,
                                        "name": "Клиент 5",
                                        "email": "user5@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 6,
                                        "name": "Клиент 6",
                                        "email": "user6@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "unique",
            "title": "Конфликт unique",
            "use": "Ужесточение правил после импорта",
            "summary": "Две строки имеют одинаковый email. Ограничение не применится: сначала нужно согласовать исправление данных.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class FailDuplicateEmail extends AbstractMigration\r\n{\r\n    public function change(): void\r\n    {\r\n        // Fixture deliberately contains duplicates. Deployment must stop, not erase clients.\r\n        $this->table('clients')->addIndex(['email'], [\r\n            'name' => 'uq_clients_email', 'unique' => true,\r\n        ])->update();\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 4,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            },
                            {
                                "id": 4,
                                "name": "Дубликат",
                                "email": "boris@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 4,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Дубликат",
                                        "email": "boris@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "unique",
                        "exitCode": 1,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/unique\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/unique-testing.sqlite\nordering by creation time\n\n == 20261111090500 FailDuplicateEmail: migrating \n",
                        "stderr": "PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: clients.email in <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:210\nStack trace:\n#0 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(210): PDO->exec('CREATE UNIQUE I...')\n#1 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(234): Phinx/Db/Adapter/PdoAdapter->execute('CREATE UNIQUE I...')\n#2 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(759): Phinx/Db/Util/AlterInstructions->execute('ALTER TABLE `cl...', Array)\n#3 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(1134): Phinx/Db/Adapter/PdoAdapter->executeAlterSteps('clients', Object(Phinx/Db/Util/AlterInstructions))\n#4 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(490): Phinx/Db/Adapter/PdoAdapter->executeActions(Object(Phinx/Db/Table/Table), Array)\n#5 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(421): Phinx/Db/Adapter/AdapterWrapper->executeActions(Object(Phinx/Db/Table/Table), Array)\n#6 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(157): Phinx/Db/Adapter/TimedOutputAdapter->executeActions(Object(Phinx/Db/Table/Table), Array)\n#7 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(755): Phinx/Db/Plan/Plan->execute(Object(Phinx/Db/Adapter/TimedOutputAdapter))\n#8 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(663): Phinx/Db/Table->executeActions(true)\n#9 <project>/db/migrations/unique/20261111090500_fail_duplicate_email.php(11): Phinx/Db/Table->update()\n#10 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(109): FailDuplicateEmail->change()\n#11 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(413): Phinx/Migration/Manager/Environment->executeMigration(Object(FailDuplicateEmail), 'up', false)\n#12 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(384): Phinx/Migration/Manager->executeMigration('testing', Object(FailDuplicateEmail), 'up', false)\n#13 <project>/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(96): Phinx/Migration/Manager->migrate('testing', 20261111090500, false)\n#14 <project>/vendor/symfony/console/Command/Command.php(341): Phinx/Console/Command/Migrate->execute(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#15 <project>/vendor/symfony/console/Application.php(1104): Symfony/Component/Console/Command/Command->run(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#16 <project>/vendor/symfony/console/Application.php(357): Symfony/Component/Console/Application->doRunCommand(Object(Phinx/Console/Command/Migrate), Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#17 <project>/vendor/robmorgan/phinx/src/Phinx/Console/PhinxApplication.php(91): Symfony/Component/Console/Application->doRun(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#18 <project>/vendor/symfony/console/Application.php(196): Phinx/Console/PhinxApplication->doRun(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#19 <project>/vendor/robmorgan/phinx/bin/phinx(28): Symfony/Component/Console/Application->run()\n#20 <project>/vendor/bin/phinx(119): include('C://Users//Alexxx...')\n#21 {main}\n"
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 4,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Дубликат",
                                        "email": "boris@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 4,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Дубликат",
                                        "email": "boris@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "unique",
                        "exitCode": 3,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/unique\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n   down  20261111090500                                            FailDuplicateEmail\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 4,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 4,
                                        "name": "Дубликат",
                                        "email": "boris@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "irreversible",
            "title": "Необратимость",
            "use": "Изменение исходных данных",
            "summary": "Регистр и пробелы исходного email потеряны. Down намеренно откажет, потому что корректно восстановить их нечем.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class NormalizeOriginalEmail extends AbstractMigration\r\n{\r\n    public function up(): void\r\n    {\r\n        $this->execute('UPDATE clients SET email = lower(trim(email))');\r\n    }\r\n    public function down(): void\r\n    {\r\n        throw new \\Phinx\\Migration\\IrreversibleMigrationException(\r\n            'Original spelling was overwritten. Use a reviewed forward fix or verified backup.'\r\n        );\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 3,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "irreversible",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/irreversible\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/irreversible-testing.sqlite\nordering by creation time\n\n == 20261111090600 NormalizeOriginalEmail: migrating \n == 20261111090600 NormalizeOriginalEmail: migrated 0.0030s\n\nAll Done. Took 0.0141s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": "anna@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090600,
                                "migration_name": "NormalizeOriginalEmail"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": "anna@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090600,
                                "migration_name": "NormalizeOriginalEmail"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx rollback -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "irreversible",
                        "exitCode": 1,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/irreversible\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/irreversible-testing.sqlite\nordering by creation time\n\n == 20261111090600 NormalizeOriginalEmail: reverting \n",
                        "stderr": "\nIn 20261111090600_normalize_original_email.php line 12:\n                                                                                     \n  Original spelling was overwritten. Use a reviewed forward fix or verified backup.  \n                                                                                     \n\nrollback [-p|--parser PARSER] [--no-info] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE] [-f|--force] [-x|--dry-run] [--fake]\n\n"
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": "anna@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090600,
                                "migration_name": "NormalizeOriginalEmail"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": "anna@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090600,
                                "migration_name": "NormalizeOriginalEmail"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "irreversible",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/irreversible\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n     up  20261111090600  2026-11-11 23:37:50  2026-11-11 23:37:50  NormalizeOriginalEmail\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": "anna@example.test",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090600,
                                "migration_name": "NormalizeOriginalEmail"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "transaction",
            "title": "Ошибка в середине",
            "use": "Проверка атомарности изменения",
            "summary": "UPDATE выполняется перед конфликтующим INSERT. Убедитесь по снимку, что SQLite вернул исходные статусы.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class FailAfterUpdate extends AbstractMigration\r\n{\r\n    public function up(): void\r\n    {\r\n        $this->execute(\"UPDATE clients SET status = 'changed'\");\r\n        // id=1 already exists. The preceding UPDATE must roll back on SQLite.\r\n        $this->execute(\"INSERT INTO clients (id,name,email,status) VALUES (1,'Conflict','conflict@example.test','new')\");\r\n    }\r\n    public function down(): void\r\n    {\r\n        throw new \\Phinx\\Migration\\IrreversibleMigrationException('This deliberately failing migration must never be applied.');\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 3,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "transaction",
                        "exitCode": 1,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/transaction\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/transaction-testing.sqlite\nordering by creation time\n\n == 20261111090700 FailAfterUpdate: migrating \n",
                        "stderr": "PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: clients.id in <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:210\nStack trace:\n#0 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(210): PDO->exec('INSERT INTO cli...')\n#1 <project>/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(162): Phinx/Db/Adapter/PdoAdapter->execute('INSERT INTO cli...', Array)\n#2 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/AbstractMigration.php(208): Phinx/Db/Adapter/AdapterWrapper->execute('INSERT INTO cli...', Array)\n#3 <project>/db/migrations/transaction/20261111090700_fail_after_update.php(10): Phinx/Migration/AbstractMigration->execute('INSERT INTO cli...')\n#4 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(120): FailAfterUpdate->up()\n#5 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(413): Phinx/Migration/Manager/Environment->executeMigration(Object(FailAfterUpdate), 'up', false)\n#6 <project>/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(384): Phinx/Migration/Manager->executeMigration('testing', Object(FailAfterUpdate), 'up', false)\n#7 <project>/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(96): Phinx/Migration/Manager->migrate('testing', 20261111090700, false)\n#8 <project>/vendor/symfony/console/Command/Command.php(341): Phinx/Console/Command/Migrate->execute(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#9 <project>/vendor/symfony/console/Application.php(1104): Symfony/Component/Console/Command/Command->run(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#10 <project>/vendor/symfony/console/Application.php(357): Symfony/Component/Console/Application->doRunCommand(Object(Phinx/Console/Command/Migrate), Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#11 <project>/vendor/robmorgan/phinx/src/Phinx/Console/PhinxApplication.php(91): Symfony/Component/Console/Application->doRun(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#12 <project>/vendor/symfony/console/Application.php(196): Phinx/Console/PhinxApplication->doRun(Object(Symfony/Component/Console/Input/ArgvInput), Object(Symfony/Component/Console/Output/ConsoleOutput))\n#13 <project>/vendor/robmorgan/phinx/bin/phinx(28): Symfony/Component/Console/Application->run()\n#14 <project>/vendor/bin/phinx(119): include('C://Users//Alexxx...')\n#15 {main}\n"
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "transaction",
                        "exitCode": 3,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/transaction\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n   down  20261111090700                                            FailAfterUpdate\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        },
        {
            "id": "seed",
            "title": "Повторяемый seed",
            "use": "Справочник для локального проекта",
            "summary": "Три тега создаются двумя запусками seed:run без дубликатов благодаря уникальному коду и ON CONFLICT.",
            "source": "<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Migration\\AbstractMigration;\r\nfinal class CreateClientTags extends AbstractMigration\r\n{\r\n    public function change(): void\r\n    {\r\n        $this->table('client_tags')->addColumn('code', 'string', ['limit' => 40])\r\n            ->addColumn('label', 'string', ['limit' => 100])\r\n            ->addIndex(['code'], ['unique' => true, 'name' => 'uq_tags_code'])->create();\r\n    }\r\n}\r\n\n\n<?php\r\ndeclare(strict_types=1);\r\nuse Phinx\\Seed\\AbstractSeed;\r\nfinal class DemoTags extends AbstractSeed\r\n{\r\n    public function run(): void\r\n    {\r\n        // Fixed demo values, SQLite-specific upsert; runs repeatedly without duplicates.\r\n        // Never truncate production tables merely to make a seed repeatable.\r\n        foreach ([['priority','Приоритет'],['regular','Постоянный'],['new','Новый']] as [$code,$label]) {\r\n            $this->execute('INSERT INTO client_tags (code,label) VALUES (?,?) ON CONFLICT(code) DO NOTHING', [$code,$label]);\r\n        }\r\n    }\r\n}\r\n",
            "initial": {
                "schema": [
                    {
                        "type": "table",
                        "name": "clients",
                        "tbl_name": "clients",
                        "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                    }
                ],
                "tables": {
                    "clients": {
                        "count": 3,
                        "columns": [
                            {
                                "cid": 0,
                                "name": "id",
                                "type": "INTEGER",
                                "notnull": 0,
                                "dflt_value": null,
                                "pk": 1
                            },
                            {
                                "cid": 1,
                                "name": "name",
                                "type": "VARCHAR(120)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 2,
                                "name": "email",
                                "type": "VARCHAR(180)",
                                "notnull": 1,
                                "dflt_value": null,
                                "pk": 0
                            },
                            {
                                "cid": 3,
                                "name": "status",
                                "type": "VARCHAR(20)",
                                "notnull": 1,
                                "dflt_value": "'new'",
                                "pk": 0
                            }
                        ],
                        "indexes": [],
                        "rows": [
                            {
                                "id": 1,
                                "name": "Анна",
                                "email": " Anna@example.test ",
                                "status": "new"
                            },
                            {
                                "id": 2,
                                "name": "Борис",
                                "email": "boris@example.test",
                                "status": "active"
                            },
                            {
                                "id": 3,
                                "name": "Вера",
                                "email": "vera@example.test",
                                "status": "new"
                            }
                        ]
                    }
                },
                "applied": [],
                "queryPlan": [
                    {
                        "id": 2,
                        "parent": 0,
                        "notused": 216,
                        "detail": "SCAN clients"
                    }
                ],
                "integrity": "ok"
            },
            "steps": [
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            }
                        },
                        "applied": [],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx migrate -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "seed",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/seed\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/seed-testing.sqlite\nordering by creation time\n\n == 20261111090800 CreateClientTags: migrating \n == 20261111090800 CreateClientTags: migrated 0.0043s\n\nAll Done. Took 0.0152s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 0,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": []
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx seed:run -s DemoTags -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "seed",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/seed\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/seed-testing.sqlite\n\n == DemoTags: seeding \n == DemoTags: seeded 0.0074s\n\nAll Done. Took 0.0081s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "code": "priority",
                                        "label": "Приоритет"
                                    },
                                    {
                                        "id": 2,
                                        "code": "regular",
                                        "label": "Постоянный"
                                    },
                                    {
                                        "id": 3,
                                        "code": "new",
                                        "label": "Новый"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "code": "priority",
                                        "label": "Приоритет"
                                    },
                                    {
                                        "id": 2,
                                        "code": "regular",
                                        "label": "Постоянный"
                                    },
                                    {
                                        "id": 3,
                                        "code": "new",
                                        "label": "Новый"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx seed:run -s DemoTags -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "seed",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/seed\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nusing adapter sqlite\nusing database <project>/var/seed-testing.sqlite\n\n == DemoTags: seeding \n == DemoTags: seeded 0.0074s\n\nAll Done. Took 0.0082s\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "code": "priority",
                                        "label": "Приоритет"
                                    },
                                    {
                                        "id": 2,
                                        "code": "regular",
                                        "label": "Постоянный"
                                    },
                                    {
                                        "id": 3,
                                        "code": "new",
                                        "label": "Новый"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                },
                {
                    "before": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "code": "priority",
                                        "label": "Приоритет"
                                    },
                                    {
                                        "id": 2,
                                        "code": "regular",
                                        "label": "Постоянный"
                                    },
                                    {
                                        "id": 3,
                                        "code": "new",
                                        "label": "Новый"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    },
                    "cli": {
                        "command": "php vendor/bin/phinx status -c phinx.php -e testing",
                        "environment": "testing",
                        "scenario": "seed",
                        "exitCode": 0,
                        "stdout": "Phinx by CakePHP - https://phinx.org. 0.16.12\n\nusing config file phinx.php\nusing config parser php\nusing migration paths \n - <project>/db/migrations/seed\nusing seed paths \n - <project>/db/seeds\nusing environment testing\nordering by creation time\n\n Status  [Migration ID]  Started              Finished             Migration Name \n----------------------------------------------------------------------------------\n     up  20261111090800  2026-11-11 23:37:51  2026-11-11 23:37:51  CreateClientTags\n\n",
                        "stderr": ""
                    },
                    "after": {
                        "schema": [
                            {
                                "type": "table",
                                "name": "client_tags",
                                "tbl_name": "client_tags",
                                "sql": "CREATE TABLE `client_tags` (`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `code` VARCHAR(40) NULL, `label` VARCHAR(100) NULL)"
                            },
                            {
                                "type": "table",
                                "name": "clients",
                                "tbl_name": "clients",
                                "sql": "CREATE TABLE clients (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) NOT NULL, email VARCHAR(180) NOT NULL, status VARCHAR(20) NOT NULL DEFAULT 'new')"
                            },
                            {
                                "type": "table",
                                "name": "phinxlog",
                                "tbl_name": "phinxlog",
                                "sql": "CREATE TABLE `phinxlog` (`version` BIGINTEGER NOT NULL, `migration_name` VARCHAR(100) NULL, `start_time` TIMESTAMP_TEXT NULL, `end_time` TIMESTAMP_TEXT NULL, `breakpoint` BOOLEAN_INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (`version`))"
                            },
                            {
                                "type": "index",
                                "name": "uq_tags_code",
                                "tbl_name": "client_tags",
                                "sql": "CREATE UNIQUE INDEX `uq_tags_code` ON `client_tags` (`code` ASC)"
                            }
                        ],
                        "tables": {
                            "clients": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "name",
                                        "type": "VARCHAR(120)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "email",
                                        "type": "VARCHAR(180)",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 3,
                                        "name": "status",
                                        "type": "VARCHAR(20)",
                                        "notnull": 1,
                                        "dflt_value": "'new'",
                                        "pk": 0
                                    }
                                ],
                                "indexes": [],
                                "rows": [
                                    {
                                        "id": 1,
                                        "name": "Анна",
                                        "email": " Anna@example.test ",
                                        "status": "new"
                                    },
                                    {
                                        "id": 2,
                                        "name": "Борис",
                                        "email": "boris@example.test",
                                        "status": "active"
                                    },
                                    {
                                        "id": 3,
                                        "name": "Вера",
                                        "email": "vera@example.test",
                                        "status": "new"
                                    }
                                ]
                            },
                            "client_tags": {
                                "count": 3,
                                "columns": [
                                    {
                                        "cid": 0,
                                        "name": "id",
                                        "type": "INTEGER",
                                        "notnull": 1,
                                        "dflt_value": null,
                                        "pk": 1
                                    },
                                    {
                                        "cid": 1,
                                        "name": "code",
                                        "type": "VARCHAR(40)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    },
                                    {
                                        "cid": 2,
                                        "name": "label",
                                        "type": "VARCHAR(100)",
                                        "notnull": 0,
                                        "dflt_value": null,
                                        "pk": 0
                                    }
                                ],
                                "indexes": [
                                    {
                                        "seq": 0,
                                        "name": "uq_tags_code",
                                        "unique": 1,
                                        "origin": "c",
                                        "partial": 0
                                    }
                                ],
                                "rows": [
                                    {
                                        "id": 1,
                                        "code": "priority",
                                        "label": "Приоритет"
                                    },
                                    {
                                        "id": 2,
                                        "code": "regular",
                                        "label": "Постоянный"
                                    },
                                    {
                                        "id": 3,
                                        "code": "new",
                                        "label": "Новый"
                                    }
                                ]
                            }
                        },
                        "applied": [
                            {
                                "version": 20261111090800,
                                "migration_name": "CreateClientTags"
                            }
                        ],
                        "queryPlan": [
                            {
                                "id": 2,
                                "parent": 0,
                                "notused": 216,
                                "detail": "SCAN clients"
                            }
                        ],
                        "integrity": "ok"
                    }
                }
            ]
        }
    ],
    "sourceHashes": {
        "db/migrations/backfill/20261111090300_backfill_email_copy.php": "e2bd1fad02006e99c4132f3b837626d31a73c2d9e38d50cd8d93de1edf82c9fd",
        "db/migrations/create/20261111090100_create_clients.php": "1be0da74faec96cb3c9d6fa5c21b77e52d0d38c5af9c6590eee337e034c2a3e0",
        "db/migrations/expand/20261111090200_add_contact_phone.php": "da80eddf519e7db5014333bb30b96b3284b999a09713c1a55381c14297a130bb",
        "db/migrations/index/20261111090400_add_email_index.php": "df8a9b28afaad70f6aa412732213562b193c5d5bbb169700b05245c252ca4f36",
        "db/migrations/irreversible/20261111090600_normalize_original_email.php": "39520262b3cc866aa00ce1b35b421f49fa9bee2a17297e18e006ba6663fbe2bc",
        "db/migrations/seed/20261111090800_create_client_tags.php": "29569fd11a93df3463edaa1e650aa8475470d5e8f5915439766b5f6f1a478771",
        "db/migrations/transaction/20261111090700_fail_after_update.php": "87bb17a00942e2bda42ba3bf432dd74a06b1dd88645b9fa2e89a33350d087646",
        "db/migrations/unique/20261111090500_fail_duplicate_email.php": "f05896e82826e128d89b356724266c26abe203df1e4369ab10ccd8fd27702f5c",
        "db/seeds/DemoTags.php": "8a1120282427113bef353ab781bc2f5818641c2997aa037393a68548559a7169",
        "composer.lock": "05c6ac8c35873e0066486e3cf97fa7d96b163b3e60291c5a6d4ee2c234a30382",
        "phinx.php": "6f19e20ba7a7e634f7cd56600071dacb96edc0741f99265830b0660ff1353e5f",
        "bin/common.php": "f15e1209fd93452e935365f5e7888b51af9e9e3fa9cf779d9415e8e6538aefbf",
        "bin/capture.php": "c9fa6bcda9d4bea78a1cd0077cd2983ed62a15b5ecd06f53c118bc8d6a9e63d5"
    }
}
