A migration is a DDL operation. up() and down() must not depend on runtime
state.
Not allowed
app(), config(), or env() for runtime decisions
TenantContext::get() and tenant-aware services
Branching on feature or module activation
Seed data that depends on runtime state
DB::table() against another module’s tables from this module’s migration
Why
A migration runs in contexts its author did not picture: on a fresh install with
no configuration yet, during a rollback, on a tenant created next year, from a CI
job with a different environment, in whatever order the migrator chose.A migration that reads configuration produces a different schema depending on
when it ran. Two installations then diverge structurally while reporting the same
migration state — and the next migration, which assumes one shape, meets the
other.Branching on module activation has the same effect with an extra trap: enabling
the module later does not re-run the migration, so the table never appears and the
failure surfaces as a missing column at runtime.Touching another module’s tables makes the migration order a hidden dependency.
Migrations from separate modules interleave; the table you read may not exist yet,
and nothing in either module says so.
The consequence for extensions
This applies to Plugin and Solution migrations exactly as it applies to Core.
Register a migrations path through CoreRegistrarInterface and let the platform
mount it — see Building a Plugin.
How it is checked
These rules are PHPat rules, executed through phpstan.neon. The default PHPUnit
run covers them through tests/Unit/Architecture/MigrationTest.php, which invokes
PHPStan.
composer run test:arch
Do not run php artisan test tests/Architecture as the architecture check —
those classes are not PHPUnit TestCases, so the command verifies nothing.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FaPost","description":"Conversational assistants and flow automation platform.","colors":{"primary":"#5a6e58","light":"#94a187","dark":"#3f4f3d"},"favicon":"https://mintcdn.com/fapost/dkK02WohiwWLokiz/favicon.svg?fit=max\u0026auto=format\u0026n=dkK02WohiwWLokiz\u0026q=85\u0026s=f3739e1cf80934093fb16564881363f9","background":{"color":{"light":"#f5f4f1","dark":"#131211"}},"navbar":{"links":[{"href":"https://github.com/fapost-lab/core","type":"github"}]},"footer":{"socials":{"github":"https://github.com/fapost-lab/core","website":"https://fapost.in"}},"fonts":{"family":"DM Sans"},"styling":{"codeblocks":{"theme":"one-dark-pro"},"latex":false},"banner":{"content":"FaPost is pre-1.0 and this documentation is still being written. Sections say where they are incomplete.","dismissible":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fapost","hasAudioNarration":false,"actualSubdomain":"fapost","customDomains":["docs.fapost.in"],"gitSource":{"type":"github","owner":"fapost-lab","repo":"core","deployBranch":"main","contentDirectory":"docs/site","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b0dec005fc55b6fe10383d1","clientVersion":"0.0.4352","searchFilterCounts":[{"language":"default","tag":"Developers","count":36},{"language":"default","tag":"User guide","count":36},{"language":"default","tag":"Self-hosting","count":15},{"language":"default","tag":"Admin panel","count":11},{"language":"default","tag":"Flows","count":10},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Operate","count":7},{"language":"default","tag":"Core internals","count":6},{"language":"default","tag":"Development environment","count":5},{"language":"default","tag":"Contributing to Core","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#content.mdx-content h2{font-size:1.75rem;line-height:1.25;letter-spacing:-0.02em;margin-top:4rem;padding-top:2rem;border-top:1px solid rgb(23 23 23 / 12%)}.dark #content.mdx-content h2{border-top-color:rgb(255 255 255 / 12%)}#content.mdx-content h2:first-child{margin-top:1rem;padding-top:0;border-top:0}#content.mdx-content h3{font-size:1.3125rem;line-height:1.35;letter-spacing:-0.01em;margin-top:2.75rem}#content.mdx-content h4{font-size:1.0625rem;line-height:1.4;margin-top:2rem;color:rgb(82 82 82)}.dark #content.mdx-content h4{color:rgb(163 163 163)}@media (max-width: 639px){#content.mdx-content h2{font-size:1.5rem;margin-top:3rem;padding-top:1.5rem}#content.mdx-content h3{font-size:1.1875rem;margin-top:2.25rem}}"}]}
{"page":{"pagePath":"contributing/migration-isolation","slug":"/contributing/migration-isolation","pageMetadata":{"title":"Migration isolation","description":"Why migrations must not depend on runtime state.","href":"/contributing/migration-isolation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Why migrations must not depend on runtime state.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A migration is a DDL operation. `,_jsx(_components.code,{children:`up()`}),` and `,_jsx(_components.code,{children:`down()`}),` must not depend on runtime\nstate.`]}),`\n`,_jsx(Heading,{level:`2`,id:`not-allowed`,children:`Not allowed`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`app()`}),`, `,_jsx(_components.code,{children:`config()`}),`, or `,_jsx(_components.code,{children:`env()`}),` for runtime decisions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TenantContext::get()`}),` and tenant-aware services`]}),`\n`,_jsx(_components.li,{children:`Branching on feature or module activation`}),`\n`,_jsx(_components.li,{children:`Seed data that depends on runtime state`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DB::table()`}),` against another module’s tables from this module’s migration`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`why`,children:`Why`}),`\n`,_jsx(_components.p,{children:`A migration runs in contexts its author did not picture: on a fresh install with\nno configuration yet, during a rollback, on a tenant created next year, from a CI\njob with a different environment, in whatever order the migrator chose.`}),`\n`,_jsxs(_components.p,{children:[`A migration that reads configuration produces a `,_jsx(_components.strong,{children:`different schema`}),` depending on\nwhen it ran. Two installations then diverge structurally while reporting the same\nmigration state — and the next migration, which assumes one shape, meets the\nother.`]}),`\n`,_jsx(_components.p,{children:`Branching on module activation has the same effect with an extra trap: enabling\nthe module later does not re-run the migration, so the table never appears and the\nfailure surfaces as a missing column at runtime.`}),`\n`,_jsx(_components.p,{children:`Touching another module’s tables makes the migration order a hidden dependency.\nMigrations from separate modules interleave; the table you read may not exist yet,\nand nothing in either module says so.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-consequence-for-extensions`,children:`The consequence for extensions`}),`\n`,_jsxs(_components.p,{children:[`This applies to Plugin and Solution migrations exactly as it applies to Core.\nRegister a migrations path through `,_jsx(_components.code,{children:`CoreRegistrarInterface`}),` and let the platform\nmount it — see `,_jsx(_components.a,{href:`/extending/plugins`,children:`Building a Plugin`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-is-checked`,children:`How it is checked`}),`\n`,_jsxs(_components.p,{children:[`These rules are PHPat rules, executed through `,_jsx(_components.code,{children:`phpstan.neon`}),`. The default PHPUnit\nrun covers them through `,_jsx(_components.code,{children:`tests/Unit/Architecture/MigrationTest.php`}),`, which invokes\nPHPStan.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes one-dark-pro one-dark-pro`,style:{backgroundColor:`#282c34`,\"--shiki-dark-bg\":`#282c34`,color:`#abb2bf`,\"--shiki-dark\":`#abb2bf`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#61AFEF`,\"--shiki-dark\":`#61AFEF`},children:`composer`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:` run`}),_jsx(_components.span,{style:{color:`#98C379`,\"--shiki-dark\":`#98C379`},children:` test:arch`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not run `,_jsx(_components.code,{children:`php artisan test tests/Architecture`}),` as the architecture check —\nthose classes are not PHPUnit `,_jsx(_components.code,{children:`TestCase`}),`s, so the command verifies nothing.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"one-dark-pro"},"config":{},"pageMetadata":{"title":"Migration isolation","description":"Why migrations must not depend on runtime state.","href":"/contributing/migration-isolation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Not allowed","slug":"not-allowed","depth":2,"children":[]},{"title":"Why","slug":"why","depth":2,"children":[]},{"title":"The consequence for extensions","slug":"the-consequence-for-extensions","depth":2,"children":[]},{"title":"How it is checked","slug":"how-it-is-checked","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"fapost","siteName":"FaPost","title":"Migration isolation - FaPost","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-27T15:07:25.486Z","originalFileLocation":"contributing/migration-isolation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Why migrations must not depend on runtime state.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FaPost\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Migration isolation - FaPost\">\u003cmeta data-mint-head property=\"og:description\" content=\"Why migrations must not depend on runtime state.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FaPost\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fapost.in/contributing/migration-isolation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fapost.mintlify.site/_mintlify/api/og/v2?division=Core+internals\u0026amp;title=Migration+isolation\u0026amp;description=Why+migrations+must+not+depend+on+runtime+state.\u0026amp;theme=baf5a1f6c1a967e68ab29869\u0026amp;signature=23bf63e4b9dbad6039a034a6ec4479832aa67c9e126d0e6fee0d438fbc345f01\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Migration isolation - FaPost\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Why migrations must not depend on runtime state.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fapost.mintlify.site/_mintlify/api/og/v2?division=Core+internals\u0026amp;title=Migration+isolation\u0026amp;description=Why+migrations+must+not+depend+on+runtime+state.\u0026amp;theme=baf5a1f6c1a967e68ab29869\u0026amp;signature=23bf63e4b9dbad6039a034a6ec4479832aa67c9e126d0e6fee0d438fbc345f01\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/fapost/2DoYb1P3wGVpeaWw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FaPost\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5a6e58\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fapost.in/contributing/migration-isolation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/contributing/migration-isolation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fapost.in/#organization\",\"name\":\"FaPost\",\"url\":\"https://docs.fapost.in\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fapost.in#website\",\"name\":\"FaPost\",\"url\":\"https://docs.fapost.in\",\"publisher\":{\"@id\":\"https://docs.fapost.in/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fapost.in/contributing/migration-isolation#webpage\",\"url\":\"https://docs.fapost.in/contributing/migration-isolation\",\"name\":\"Migration isolation\",\"description\":\"Why migrations must not depend on runtime state.\",\"dateModified\":\"2026-08-27T15:07:25.486Z\",\"isPartOf\":{\"@id\":\"https://docs.fapost.in#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fapost.in/contributing/migration-isolation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fapost.in/contributing/migration-isolation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core internals\",\"item\":\"https://docs.fapost.in/contributing/runtime\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migration isolation\",\"item\":\"https://docs.fapost.in/contributing/migration-isolation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.fapost.in/contributing/migration-isolation#article\",\"headline\":\"Migration isolation\",\"name\":\"Migration isolation\",\"description\":\"Why migrations must not depend on runtime state.\",\"url\":\"https://docs.fapost.in/contributing/migration-isolation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fapost.in/contributing/migration-isolation#webpage\"},\"dateModified\":\"2026-08-27T15:07:25.486Z\",\"publisher\":{\"@id\":\"https://docs.fapost.in/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fapost.in#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FaPost\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"FaPost\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/contributing/migration-isolation.md","siteName":"FaPost","nav":{"global":null,"tabs":[{"tab":"User guide","pages":[{"title":"User guide","href":""}]},{"tab":"Self-hosting","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"tab":"Developers","groups":[{"group":"Overview","pages":[{"title":"For developers","href":"/contributing/overview"},{"title":"Technology stack","href":"/contributing/stack"}]},{"group":"Development environment","pages":[{"title":"Local setup","href":"/contributing/local-setup"},{"title":"Receiving webhooks locally","href":"/contributing/local-webhooks"},{"title":"Repository layout","href":"/contributing/repo-layout"},{"title":"Coding conventions","href":"/contributing/conventions"},{"title":"Coding agents and Jig","href":"/contributing/coding-agents"}]},{"group":"Extension model","pages":[{"title":"Extension model","href":"/extending/extension-model"},{"title":"Choosing an extension type","href":"/extending/choosing-an-extension-type"}]},{"group":"Building extensions","pages":[{"title":"Development setup","href":"/extending/development-setup"},{"title":"Building a Solution","href":"/extending/solutions"},{"title":"Starting a Solution","href":"/extending/solution-scaffold"},{"title":"Connectors","href":"/extending/connectors"},{"title":"Building a Plugin","href":"/extending/plugins"}]},{"group":"Flow nodes","pages":[{"title":"Handler contract","href":"/extending/flow-nodes/handler-contract"},{"title":"Versioning and compatibility","href":"/extending/flow-nodes/versioning"},{"title":"State namespaces","href":"/extending/flow-nodes/state-namespaces"},{"title":"Idempotency and retries","href":"/extending/flow-nodes/idempotency"}]},{"group":"Extension surfaces","pages":[{"title":"Builder UI extensions","href":"/extending/builder-ui"},{"title":"Console UI","href":"/extending/console-ui"},{"title":"Channel contracts","href":"/extending/channel-drivers"},{"title":"Data accessors","href":"/extending/data-accessors"},{"title":"Multilingual extensions","href":"/extending/multilingual"}]},{"group":"Shipping an extension","pages":[{"title":"Testing your extension","href":"/extending/testing"},{"title":"Stability policy","href":"/extending/stability-policy"}]},{"group":"Core internals","pages":[{"title":"Runtime architecture","href":"/contributing/runtime"},{"title":"Tenant-aware execution","description":"Why tenant context is required and how it is carried.","href":"/contributing/tenant-aware-execution"},{"title":"Migration isolation","href":"/contributing/migration-isolation"},{"title":"Long-lived worker safety","description":"Why state must not survive between jobs, and how to keep it from doing so.","href":"/contributing/worker-safety"},{"title":"ID strategy","href":"/contributing/id-strategy"},{"title":"Dependency direction","href":"/contributing/dependency-direction"}]},{"group":"Contributing to Core","pages":[{"title":"Testing and architecture checks","href":"/contributing/testing"},{"title":"Commit messages","href":"/contributing/commits"},{"title":"Pull requests","href":"/contributing/pull-requests"},{"title":"Releases and versioning","href":"/contributing/releases"},{"title":"Licence, CLA and trademark","href":"/contributing/legal"}]}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/foundation-contracts"}]}]},"basePath":"","title":"Migration isolation - FaPost","deploymentId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","buildId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","dynamics":[],"chunks":[]}