1"use strict";(globalThis.webpackChunkmy_website=globalThis.webpackChunkmy_website||[]).push([[2514],{15680(e,t,n){n.d(t,{xA:()=>c,yg:()=>d});var o=n(96540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),g=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=g(e.components);return o.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=g(n),d=r,f=u["".concat(l,".").concat(d)]||u[d]||p[d]||i;return n?o.createElement(f,a(a({ref:t},c),{},{components:n})):o.createElement(f,a({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,a[1]=s;for(var g=2;g<i;g++)a[g]=n[g];return o.createElement.apply(null,a)}return o.createElement.apply(null,n)}u.displayName="MDXCreateElement"},58429(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>g});var o=n(58168),r=(n(96540),n(15680));const i={sidebar_position:0},a="Migration Guides",s={unversionedId:"migration/readme",id:"version-v30/migration/readme",title:"Migration Guides",description:"Welcome to the section on upgrading to a newer version of IGNITE\xae CLI! If you're",source:"@site/versioned_docs/version-v30/06-migration/readme.md",sourceDirName:"06-migration",slug:"/migration/",permalink:"/migration/",draft:!1,tags:[],version:"v30",sidebarPosition:0,frontMatter:{sidebar_position:0},sidebar:"tutorialSidebar",previous:{title:"Improving documentation",permalink:"/contributing"},next:{title:"v30.0.0",permalink:"/migration/v30.0.0"}},l={},g=[{value:"Create your own Migration Guide",id:"create-your-own-migration-guide",level:2},{value:"How to Get Started",id:"how-to-get-started",level:2},{value:"Example Migration",id:"example-migration",level:3},{value:"Usage",id:"usage",level:2}],c={toc:g};function p(e){let{components:t,...n}=e;return(0,r.yg)("wrapper",(0,o.A)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"migration-guides"},"Migration Guides"),(0,r.yg)("p",null,"Welcome to the section on upgrading to a newer version of IGNITE\xae CLI! If you're\nlooking to update to the latest version, you'll want to start by checking the\ndocumentation to see if there are any special considerations or instructions you\nneed to follow."),(0,r.yg)("p",null,"If there is no documentation for the latest version of IGNITE\xae CLI, it's\ngenerally safe to assume that there were no breaking changes, and you can\nproceed with using the latest version with your project."),(0,r.yg)("h2",{id:"create-your-own-migration-guide"},"Create your own Migration Guide"),(0,r.yg)("p",null,"The ",(0,r.yg)("inlineCode",{parentName:"p"},"gen-mig-diffs")," tool helps developers manage and visualize code changes across multiple major versions of IGNITE\xae. With each major upgrade, the codebase might undergo significant changes, making it challenging for developers to track these differences after several updates. The ",(0,r.yg)("inlineCode",{parentName:"p"},"gen-mig-diffs")," tool simplifies this process by scaffolding blockchains with both the old and new versions and displaying the differences."),(0,r.yg)("p",null,"It is located in the ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/ignite/cli/tree/main/ignite/internal/tools/gen-mig-diffs"},"IGNITE\xae CLI GitHub repository"),"\ndirectory and has been made into a standalone project."),(0,r.yg)("p",null,"To set up this tool in your development environment:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-shell"},"gen-mig-diffs [flags]\n")),(0,r.yg)("p",null,"This tool generates migration diff files for each of IGNITE\xae's scaffold commands. It compares two specified versions of IGNITE\xae and provides a clear, organized view of the changes."),(0,r.yg)("h2",{id:"how-to-get-started"},"How to Get Started"),(0,r.yg)("ol",null,(0,r.yg)("li",{parentName:"ol"},"Clone the IGNITE\xae CLI repository:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-shell"},"git clone https://github.com/ignite/cli.git --depth=1 && \\\ncd cli/ignite/internal/tools/gen-mig-diffs\n")),(0,r.yg)("ol",{start:2},(0,r.yg)("li",{parentName:"ol"},"Install and show usage:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-shell"},"go install . && gen-mig-diffs -h\n")),(0,r.yg)("h3",{id:"example-migration"},"Example Migration"),(0,r.yg)("p",null,"As an example, to generate migration diffs between versions 0.27.2 and 28.3.0, use the following command:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-shell"},"gen-mig-diffs --output temp/migration --from v0.27.2 --to v28.3.0\n")),(0,r.yg)("p",null,"This command scaffolds blockchains with the specified versions and shows the differences, making it easier for developers to understand and apply necessary changes when upgrading their projects."),(0,r.yg)("h2",{id:"usage"},"Usage"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},'This tool is used to generate migration diff files for each of ignites scaffold commands\n\nUsage:\n gen-mig-diffs [flags]\n\nFlags:\n -f, --from string Version of IGNITE\xae or path to IGNITE\xae source code to generate the diff from\n -h, --help help for gen-mig-diffs\n -o, --output string Output directory to save the migration document (default "docs/docs/06-migration")\n --repo-output string Output path to clone the IGNITE\xae repository\n -s, --repo-source string Path to IGNITE\xae source code repository. Set the source automatically set the cleanup to fal
1se\n --repo-url string Git URL for the IGNITE\xae repository (default "https://github.com/ignite/cli.git")\n --scaffold-cache string Path to cache directory\n --scaffold-output string Output path to clone the IGNITE\xae repository\n -t, --to string Version of IGNITE\xae or path to IGNITE\xae source code to generate the diff to\n')))}p.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.