Migration
A saved change to your database structure.
What is Migration?
When you need to add a new column or table to your database, you create a migration. It's like a version history for your database structure — you can apply it, roll it back, and share it with others.
Migrations make sure everyone working on the project has the same database structure. Without them, one person's database might look different from another's.
In Vibe Coding
In Lovable, migrations happen automatically when you change your database. In Cursor with Supabase, you create migrations using the Supabase CLI. Always test migrations locally before running them on production.
Example
For example: Your users table has name and email. You realize you also need a phone number. You create a migration that adds a phone column — without losing any existing data.