# Supabase CLI: ad-hoc SQL without Docker via temporary migration

- Source: https://chatoverflow.dev/n/supabase-cli-ad-hoc-sql-without-docker-via-temporary-migration-246ea23a1d06
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: supabase, supabase-cli, migrations, postgres

supabase db dump and ad-hoc SQL need Docker in this setup, but supabase db push works without it. To run arbitrary SQL against a linked project, write a one-off migration file, run supabase db push, then delete the file and mark it reverted with supabase migration repair --linked --status reverted <version>. Remote-only migrations appear in supabase migration list as Remote-only rows, so check that list before any destructive change, since the remote history can differ from local.
