[{"data":1,"prerenderedAt":121},["ShallowReactive",2],{"term-m\u002Fmigration":3,"related-m\u002Fmigration":108},{"id":4,"title":5,"acronym":6,"body":7,"category":90,"description":91,"difficulty":92,"extension":93,"letter":94,"meta":95,"navigation":59,"path":96,"related":97,"seo":102,"sitemap":103,"stem":106,"subcategory":6,"__hash__":107},"terms\u002Fterms\u002Fm\u002Fmigration.md","Migration",null,{"type":8,"value":9,"toc":84},"minimark",[10,15,19,23,26,30,73,77,80],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A migration is a versioned script that modifies your database schema — adding a column, creating a table, changing a type. Migrations are like git commits for your database. You can run them in order or roll them back.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A database migration is a versioned, incremental change to a database schema managed through code. Migration tools (Flyway, Liquibase, Knex, Prisma, Rails, Django) track which migrations have been applied and allow controlled schema evolution across environments. Each migration has an up (apply) and optionally a down (rollback) function.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- Migration: add phone_number column\nALTER TABLE users ADD COLUMN phone_number TEXT;\n\n-- Rollback:\nALTER TABLE users DROP COLUMN phone_number;\n","sql","",[38,39,40,48,54,61,67],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"-- Migration: add phone_number column\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"ALTER TABLE users ADD COLUMN phone_number TEXT;\n",[41,55,57],{"class":43,"line":56},3,[41,58,60],{"emptyLinePlaceholder":59},true,"\n",[41,62,64],{"class":43,"line":63},4,[41,65,66],{},"-- Rollback:\n",[41,68,70],{"class":43,"line":69},5,[41,71,72],{},"ALTER TABLE users DROP COLUMN phone_number;\n",[11,74,76],{"id":75},"when-youll-hear-this","When You'll Hear This",[16,78,79],{},"\"Create a migration to add the phone_number column.\" \u002F \"Never edit a migration that has already been run in production — create a new one.\"",[81,82,83],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":85},[86,87,88,89],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":75,"depth":50,"text":76},"database","A migration is a versioned script that modifies your database schema — adding a column, creating a table, changing a type.","beginner","md","m",{},"\u002Fterms\u002Fm\u002Fmigration",[98,99,100,101],"Schema","Seed","Backup","Database",{"title":5,"description":91},{"changefreq":104,"priority":105},"weekly",0.7,"terms\u002Fm\u002Fmigration","i411mMPa_O_fnRfvQ2B-1ZYukxYA6y2mxlrV7x2VYKM",[109,112,115,118],{"title":100,"path":110,"acronym":6,"category":90,"difficulty":92,"description":111},"\u002Fterms\u002Fb\u002Fbackup","A database backup is a saved copy of your data at a specific point in time.",{"title":101,"path":113,"acronym":6,"category":90,"difficulty":92,"description":114},"\u002Fterms\u002Fd\u002Fdatabase","A database is like a super-organized filing cabinet for your app's data.",{"title":98,"path":116,"acronym":6,"category":90,"difficulty":92,"description":117},"\u002Fterms\u002Fs\u002Fschema","A database schema is the blueprint of your database — which tables exist, what columns they have, what types they are, and how they relate to each other.",{"title":99,"path":119,"acronym":6,"category":90,"difficulty":92,"description":120},"\u002Fterms\u002Fs\u002Fseed","Seeding a database means filling it with initial or test data automatically.",1776518295317]