PageSourceSearch

https://atlasgo.io/assets/js/cbdcc898.1b01c5bb.js

js atlasgo.io collected 2026-10-02 07:06:01 UTC 10,927 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3613],{29939:(a,e,s)=>{s.r(e),s.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});var t=s(81160),l=s(74848),n=s(71184);s(86757);const r={title:"From Manual to Automated Database Schema Migrations",authors:["noarogo"],tags:["declarative migrations"],slug:"/2025/05/11/auto-vs-manual"},i=void 0,o={authorsImageUrls:[void 0]},c=[];function d(a){const e={a:"a",li:"li",p:"p",ul:"ul",...(0,n.R)(),...a.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.p,{children:"Software teams commonly embrace DevOps for delivery, creating automated CI/CD pipelines that allow for rapid\nand reliable software delivery. Suprisingly, some of these same teams still manage their database schema manually, causing\nan interesting contrast."}),"\n",(0,l.jsx)(e.p,{children:"Picture this: a team spent countless hours ensuring that every change to their application code is:"}),"\n",(0,l.jsxs)(e.ul,{children:["\n",(0,l.jsx)(e.li,{children:"Version controlled"}),"\n",(0,l.jsx)(e.li,{children:"Automatically tested, built, and stored in an Artifact Repository"}),"\n",(0,l.jsx)(e.li,{children:"Automatically deployed"}),"\n",(0,l.jsx)(e.li,{children:"Easily rolled back"}),"\n"]}),"\n",(0,l.jsx)(e.p,{children:"Yet when it comes to making changes to their database schema, the process looks very different: a developer writes a SQL\nmigration script, connects to the production database with privileged access, runs the script manually, and (if successful)\ncontinues with deployment. The entire process is in the hands of the developer."}),"\n",(0,l.jsx)(e.p,{children:"Projects frequently begin with manual database schema management because it's the easiest option, particularly when databases\nare small, changes are infrequent, and there are no users. However, as applications evolve and schema migrations grow more complex,\nthis practice becomes a looming risk."}),"\n",(0,l.jsxs)(e.p,{children:["Let's explore the pitfalls of manual migrations, the benefits of automated migrations, and getting started with ",(0,l.jsx)(e.a,{href:"/",children:"Atlas"})," to automate\nyour database schema management."]})]})}function h(a={}){const{wrapper:e}={...(0,n.R)(),...a.components};return e?(0,l.jsx)(e,{...a,children:(0,l.jsx)(d,{...a})}):d(a)}},36452:(a,e,s)=>{s.d(e,{I:()=>n});s(96540);var t=s(12518),l=s(74848);function n({icon:a,alt:e="",className:s}){return a?(0,l.jsx)("img",{className:`${s||""}`,src:(0,t.Ay)(`/icons-docs/${a}`),alt:e}):null}},61961:(a,e,s)=>{s.d(e,{Z:()=>r});s(96540);var t=s(49073),l=s(44129),n=s(74848);function r({children:a,className:e,url:s}){return s?(0,n.jsx)(l.A,{to:s,className:(0,t.QP)("group flex flex-col items-center p-4 hover:no-underline rounded-lg border-lightGrey border hover:shadow-md dark:bg-transparent dark:hover:bg-white transition-all",e),children:a}):(0,n.jsx)("div",{className:(0,t.QP)("flex flex-col items-center p-4 rounded-lg dark:bg-[#fff] border-lightGrey border",e),children:a})}},81160:a=>{a.exports=JSON.parse('{"permalink":"/blog/2025/05/11/auto-vs-manual","source":"@site/blog/2025-05-11-manual-migrations.mdx","title":"From Manual to Automated Database Schema Migrations","description":"Software teams commonly embrace DevOps for delivery, creating automated CI/CD pipelines that allow for rapid","date":"2025-05-11T00:00:00.000Z","tags":[{"inline":true,"label":"declarative migrations","permalink":"/blog/tags/declarative-migrations"}],"readingTime":6.85,"hasTruncateMarker":true,"authors":[{"name":"Noa Rogoszinski","title":"DevRel Engineer","imageURL":"https://github.com/noarogo.png","key":"noarogo","page":null}],"frontMatter":{"title":"From Manual to Automated Database Schema Migrations","authors":["noarogo"],"tags":["declarative migrations"],"slug":"/2025/05/11/auto-vs-manual"},"unlisted":false,"prevItem":{"title":"Atlas v0.33: Introducing Atlas Copilot and more","permalink":"/blog/2025/05/12/v033-atlas-copilot"},"nextItem":{"title":"Handling Migration Errors: How Atlas Improves on golang-migrate","permalink":"/blog/2025/04/06/atlas-and-golang-migrate"}}')},86757:(a,e,s)=>{s.d(e,{Ay:()=>h,RM:()=>c});var t=s(74848),l=s(71184),n=s(48303),r=s(71949),i=s(36452),o=s(61961);const c=[];function d(a){const e={a:"a",code:"code",p:"p",pre:"pre",strong:"strong",...(0,l.R)(),...a.components};return(0,t.jsxs)(n.A,{defaultValue:"apple-intel-plain+linux",values:[{label:"macOS + Linux",value:"apple-intel-plain+linux"},{label:"Homebrew",value:"apple-intel-brew"},{label:"Docker",value:"docker"},{label:"Windows",value:"windows"},{label:"CI",value:"ci"},{label:"Manual Installation",value:"manual"}],children:[(0,t.jsxs)(r.A,{value:"apple-intel-plain+linux",children:[(0,t.jsx)(e.p,{children:"To download and install the latest release of the Atlas CLI, simply run the following in your terminal:"}),(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-shell",children:"curl -sSf https://atlasgo.sh | sh\n"})})]}),(0,t.jsxs)(r.A,{value:"apple-intel-brew",children:[(0,t.jsxs)(e.p,{children:["Get the latest release with ",(0,t.jsx)(e.a,{href:"https://brew.sh/",children:"Homebrew"}),":"]}),(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-shell",children:"brew install ariga/tap/atlas\n"})})]}),(0,t.jsxs)(r.A,{value:"docker",children:[(0,t.jsx)(e.p,{children:"To pull the Atlas image and run it as a Docker container:"}),(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-shell",children:"docker pull arigaio/atlas\ndocker run --rm arigaio/atlas --help\n"})}),(0,t.jsxs)(e.p,{children:["If the container needs access to the host network or a local directory, use the ",(0,t.jsx)(e.code,{children:"--net=host"})," flag and mount the desired\ndirectory:"]}),(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-shell",children:'docker run --rm --net=host \\\n  -v $(pwd)/migrations:/migrations \\\n  arigaio/atlas migrate apply \\\n  --url "mysql://root:pass@:3306/test"\n'})})]}),(0,t.jsx)(r.A,{value:"windows",children:(0,t.jsxs)(e.p,{children:["Download the ",(0,t.jsx)(e.a,{href:"https://atlasbinaries.com/atlas/atlas-windows-amd64-latest.exe",children:"latest release"})," and\nmove the atlas binary to a file location on your system PATH."]})}),(0,t.jsxs)(r.A,{value:"ci",children:[(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"GitHub Actions"})}),(0,t.jsxs)(e.p,{children:["Use the ",(0,t.jsx)(e.a,{href:"https://github.com/marketplace/actions/setup-atlas",children:"setup-atlas"})," action to install Atlas in your GitHub Actions workflow:"]}),(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-yaml",children:"- uses: ariga/setup-atlas@v0\n  with:\n    cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }}\n"})}),(0,t.jsx)(e.p,{children:(0,t.jsx)(e.strong,{children:"Other CI Platforms"})}),(0,t.jsxs)(e.p,{children:["For other CI/CD platforms, use the installation script. See the ",(0,t.jsx)(e.a,{href:"/integrations#cicd-platforms",children:"CI/CD integrations"})," for more details."]})]}),(0,t.jsxs)(r.A,{value:"manual",children:[(0,t.jsx)(e.p,{children:"If you want to manually install the Atlas CLI, pick one of the below builds suitable for your system."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 auto-cols-fr gap-4 mt-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{children:"MacOS"}),(0,t.jsx)(o.Z,{children:(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)(i.I,{icon:"download.svg",alt:"Download icon"}),(0,t.jsx)("span",{className:"!text-darkBlue",children:(0,t.jsxs)(e.p,{children:[(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-amd64-latest",className:"!font-mono",children:"AMD 64 "}),"\n(",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-amd64-latest.md5",className:"!font-mono",children:"md5"}),"/",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-amd64-latest.sha256",className:"!font-mono",children:"sha256"}),")"]})})]})}),(0,t.jsx)(o.Z,{children:(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)(i.I,{icon:"download.svg",alt:"Download icon"}),(0,t.jsx)("span",{className:"!text-darkBlue",children:(0,t.jsxs)(e.p,{children:[(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-arm64-latest",className:"!font-mono",children:"ARM 64 "}),"\n(",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-arm64-latest.md5",className:"!font-mono",children:"md5"}),"/",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-darwin-arm64-latest.sha256",className:"!font-mono",children:"sha256"}),")"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{children:"Linux"}),(0,t.jsx)(o.Z,{children:(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)(i.I,{icon:"download.svg",alt:"Download icon"}),(0,t.jsx)("span",{className:"!text-darkBlue !font-mono",children:(0,t.jsxs)(e.p,{children:[(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-amd64-latest",className:"!font-mono",children:"AMD 64 "}),"\n(",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-amd64-latest.md5",className:"!font-mono",children:"md5"}),"/",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-amd64-latest.sha256",className:"!font-mono",children:"sha256"}),")"]})})]})}),(0,t.jsx)(o.Z,{children:(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)(i.I,{icon:"download.svg",alt:"Download icon"}),(0,t.jsx)("span",{className:"!text-darkBlue !font-mono",children:(0,t.jsxs)(e.p,{children:[(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-arm64-latest",className:"!font-mono",children:"ARM 64 "}),"\n(",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-arm64-latest.md5",className:"!font-mono",children:"md5"}),"/",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-linux-arm64-latest.sha256",className:"!font-mono",children:"sha256"}),")"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{children:"Windows"}),(0,t.jsx)(o.Z,{children:(0,t.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,t.jsx)(i.I,{icon:"download.svg",alt:"Download icon"}),(0,t.jsx)("span",{className:"!text-darkBlue !font-mono",children:(0,t.jsxs)(e.p,{children:[(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-windows-amd64-latest.exe",className:"!font-mono",children:"AMD 64 "}),"\n(",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-windows-amd64-latest.exe.md5",className:"!font-mono",children:"md5"}),"/",(0,t.jsx)("a",{href:"https://atlasbinaries.com/atlas/atlas-windows-amd64-latest.exe.sha256",className:"!font-mono",children:"sha256"}),")"]})})]})})]})]})]})]})}function h(a={}){const{wrapper:e}={...(0,l.R)(),...a.components};return e?(0,t.jsx)(e,{...a,children:(0,t.jsx)(d,{...a})}):d(a)}}}]);

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.