{"slug":"bitrix-sprint-migration","title":"bitrix-sprint-migration","summary":"Covers Bitrix module sprint.migration — Version migrations, HelperManager (Iblock/Hlblock/Option/Agent/…), builders (run), CLI migrate.php (add/ls/up/down/redo/mark), configs migrations.*.php, restartable batches, exchange dirs. Use when creating or applying DB/schema/content mig","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-28T17:02:00.061729Z","repo":{"url":"https://github.com/bxmaximum/bitrix-framework-skills","stars":54,"forks":6,"license":"MIT","updatedAt":"2026-11-04T18:32:04Z"},"bodyHtml":"<hr>\n<h2>name: bitrix-sprint-migration\ndescription: &gt;-\nCovers Bitrix module sprint.migration — Version migrations, HelperManager\n(Iblock/Hlblock/Option/Agent/…), builders (run), CLI migrate.php\n(add/ls/up/down/redo/mark), configs migrations.*.php, restartable batches,\nexchange dirs. Use when creating or applying DB/schema/content migrations,\nexporting iblock/HL/options via builders, or debugging migration state.\nKey terms — sprint.migration, Version, up/down, HelperManager, saveIblock,\nsaveHlblock, migrate.php, version builders, migration_dir.</h2>\n<h1>Bitrix sprint.migration</h1>\n<p>Module <strong><code>sprint.migration</code></strong> (Composer: <code>andreyryabin/sprint.migration</code>) stores\nschema/content changes as PHP classes under VCS and applies them on each copy\nof the project via CLI or admin UI.</p>\n<p>Install location (either is valid; resolve before calling CLI):</p>\n<table>\n<thead>\n<tr>\n<th>Path</th>\n<th>Typical when</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>/local/modules/sprint.migration/</code></td>\n<td>Composer / marketplace into <code>local</code></td>\n</tr>\n<tr>\n<td><code>/bitrix/modules/sprint.migration/</code></td>\n<td>Marketplace / copy into kernel modules</td>\n</tr>\n</tbody>\n</table>\n<p>Below, <strong><code>{module}</code></strong> means that resolved directory. Do <strong>not</strong> edit module\nsource. Write only migration files and optional configs (usually under\n<code>php_interface/</code>).</p>\n<p>Progressive disclosure: open <strong>only</strong> the rule files that match the task.</p>\n<h2>How to use</h2>\n<ol>\n<li>Confirm the module is installed (<code>Loader::includeModule('sprint.migration')</code>).</li>\n<li>Identify the layer (CLI/config vs writing a Version vs helpers/builders).</li>\n<li>Open the matching <code>rules/*.md</code> below.</li>\n<li>Prefer helpers/<code>save*</code> APIs over raw Bitrix API when they cover the entity.</li>\n<li>For domain ORM/data updates without builders — use D7/<code>Result</code> inside <code>up()</code>,\nstill as a <code>Version</code> class.</li>\n</ol>\n<p>Official wiki: <a href=\"https://github.com/andreyryabin/sprint.migration/wiki\">https://github.com/andreyryabin/sprint.migration/wiki</a></p>\n<h2>Defaults (override via <code>migrations.*.php</code> / module options)</h2>\n<table>\n<thead>\n<tr>\n<th>Item</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Migration dir</td>\n<td><code>{local\\|bitrix}/php_interface/migrations</code> (<code>local</code> wins if present)</td>\n</tr>\n<tr>\n<td>Versions table</td>\n<td><code>sprint_migration_versions</code></td>\n</tr>\n<tr>\n<td>Class prefix</td>\n<td><code>Version</code> + timestamp <code>YmdHis</code> (name must contain a valid timestamp)</td>\n</tr>\n<tr>\n<td>Extend class</td>\n<td><code>Sprint\\Migration\\Version</code></td>\n</tr>\n<tr>\n<td>CLI entry</td>\n<td><code>php {module}/tools/migrate.php</code></td>\n</tr>\n<tr>\n<td>Extra configs</td>\n<td><code>{local\\|bitrix}/php_interface/migrations.&lt;name&gt;.php</code> → dir <code>migrations.&lt;name&gt;</code>, table <code>sprint_migration_&lt;name&gt;</code></td>\n</tr>\n</tbody>\n</table>\n<h2>Choose a rule file</h2>\n<h3>When to read <code>rules/cli-config.md</code></h3>\n<p>Read when the task involves:</p>\n<ul>\n<li>Running CLI (<code>add</code>, <code>ls</code>, <code>up</code>, <code>down</code>, <code>redo</code>, <code>mark</code>, <code>run</code>, <code>config</code>)</li>\n<li>Naming versions / timestamps</li>\n<li>Multiple configs (<code>--config</code>, <code>migrations.*.php</code>)</li>\n<li>Admin UI vs console auth user</li>\n</ul>\n<h3>When to read <code>rules/writing.md</code></h3>\n<p>Read when the task involves:</p>\n<ul>\n<li>Authoring <code>Version</code> (<code>up</code> / <code>down</code>)</li>\n<li>Idempotent <code>save*</code> vs <code>add*IfNotExists</code></li>\n<li>Output (<code>outSuccess</code> / <code>outError</code>), return <code>false</code> on failure</li>\n<li>Dependencies (<code>checkRequiredVersions</code>)</li>\n<li>Restartable long migrations</li>\n<li>Exchange files / large data sets</li>\n<li>Hand-written data migrations (ORM / SQL)</li>\n</ul>\n<h3>When to read <code>rules/helpers-builders.md</code></h3>\n<p>Read when the task involves:</p>\n<ul>\n<li>Choosing a Helper (<code>Iblock()</code>, <code>Hlblock()</code>, …)</li>\n<li>Choosing a Builder (<code>run IblockBuilder</code>, …)</li>\n<li>Export-from-admin → commit generated PHP</li>\n</ul>\n<h3>When to read <code>rules/checklist.md</code></h3>\n<p>Read before finishing or reviewing a migration change:</p>\n<ul>\n<li>Safety / anti-patterns</li>\n<li>Apply / verify checklist</li>\n</ul>\n<h2>Related skills</h2>\n<table>\n<thead>\n<tr>\n<th>Need</th>\n<th>Skill</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Iblock domain model</td>\n<td><code>bitrix-iblocks</code></td>\n</tr>\n<tr>\n<td>Highloadblock CRUD</td>\n<td><code>bitrix-highloadblock</code></td>\n</tr>\n<tr>\n<td>Raw SQL / DDL outside helpers</td>\n<td><code>bitrix-database</code></td>\n</tr>\n<tr>\n<td>Module install SQL (not sprint)</td>\n<td><code>bitrix-modules</code></td>\n</tr>\n<tr>\n<td>Agents registration</td>\n<td><code>bitrix-background-jobs</code></td>\n</tr>\n<tr>\n<td>Options / storage choice</td>\n<td><code>bitrix-storage</code></td>\n</tr>\n</tbody>\n</table>\n<h2>Checklist</h2>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Opened only the rule file(s) needed for this task.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Migration files live under the configured <code>migration_dir</code> (not in the module).</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Did not modify sprint.migration module source.</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Applied <code>up</code> on a local/dev copy when verifying the change.</li>\n</ul>\n","files":[{"path":"rules/checklist.md","sizeBytes":2597,"isText":true},{"path":"rules/cli-config.md","sizeBytes":4328,"isText":true},{"path":"rules/helpers-builders.md","sizeBytes":5014,"isText":true},{"path":"rules/writing.md","sizeBytes":5345,"isText":true},{"path":"SKILL.md","sizeBytes":2930,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-06T21:49:42.394352Z","sha256":"BE30FDC74E52DAA8FAF1302899D5BE7DAE9069ECCC194A2429472151FE9ABFB5","sizeBytes":9804},"review":null,"source":{"repositoryUrl":"https://github.com/bxmaximum/bitrix-framework-skills","path":"skills/bitrix-sprint-migration","license":"MIT","commit":"0c65452399e1c5901c1f316685f70029ee54b877","subtreeSha":"D0A7704ED02BC12AFC6E312C835BC78FDA3A26E7A4D2D854C84057C788F88483","lastSyncedAt":"2026-11-06T21:45:14.125597Z"},"reviewedAt":"2026-11-06T21:58:13.928851Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/bxmaximum/bitrix-framework-skills/tree/main/skills/bitrix-sprint-migration"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install bxmaximum-bitrix-framework-skills@llmmart"},{"target":"git","command":"git clone https://github.com/bxmaximum/bitrix-framework-skills.git"}]}