2.5 KiB
Supabase Directory Migration
What Changed
The Supabase configuration has been moved from management-dashboard-web-app/supabase/ to the project root supabase/ directory.
Why This Change?
- Better Architecture: Supabase is shared infrastructure, not specific to the web app
- Monorepo Best Practice: Infrastructure concerns should be at the root level
- Easier Access: Other services (APIs, scripts) can now easily reference the database
- Clearer Ownership: Makes it obvious that Supabase is a project-wide resource
Migration Steps
For Docker Compose Users
No action needed! The docker-compose.yml has been updated to use the new paths. Just restart your containers:
docker compose down
docker compose up -d
For Supabase CLI Users
Before (old way):
cd management-dashboard-web-app
supabase start
supabase db reset
After (new way):
# From project root - no need to cd!
supabase start
supabase db reset
The Supabase CLI automatically looks for the supabase/ directory in the current working directory, so you can now run all Supabase commands from the project root.
Updating Your Workflow
If you have scripts or documentation that reference the old path, update them:
-
❌
management-dashboard-web-app/supabase/migrations/ -
✅
supabase/migrations/ -
❌
management-dashboard-web-app/supabase/config.toml -
✅
supabase/config.toml
Current State
The old directory (management-dashboard-web-app/supabase/) has been removed. All Supabase and DB configuration, migrations, and seeds now live only under the project root supabase/ directory. Docker Compose and the Supabase CLI use root supabase/ exclusively.
Verification
To verify the migration:
-
Check docker-compose paths (only root supabase should be referenced):
grep "supabase" docker-compose.yml # Should show only ./supabase/ (no management-dashboard-web-app/supabase/) -
Test Supabase CLI:
# From project root supabase status # Should work without needing to cd into management-dashboard-web-app -
Test migrations:
docker compose up -d docker compose logs supabase-migrate # Should show migrations running successfully
Benefits
✅ Run Supabase commands from project root
✅ Clearer project structure
✅ Easier to share database across services
✅ Better alignment with monorepo best practices
✅ Infrastructure separated from application code