Running migrations locally and remotely
📖 Scenario: You are managing a database for a web application using Supabase. You need to apply database changes called migrations both on your local machine and on the remote Supabase project to keep the database structure consistent.
🎯 Goal: Learn how to create a migration file locally, configure the Supabase project reference, apply the migration locally, and then push the migration to the remote Supabase database.
📋 What You'll Learn
Create a migration file with a specific name
Set the Supabase project reference URL
Apply the migration locally
Push the migration to the remote Supabase project
💡 Why This Matters
🌍 Real World
Database migrations keep your database structure consistent across development and production environments, preventing errors and data loss.
💼 Career
Knowing how to manage migrations is essential for backend developers, DevOps engineers, and cloud architects working with databases and cloud services.
Progress0 / 4 steps