Supabase Migrator (v1.1.4) is a comprehensive migration and cleanup toolkit for Supabase PostgreSQL databases. It provides automated schema migrations, backup/restore, and database cleanup operations specifically tailored for Supabase projects. Features include migration versioning, dry-run support, and built-in safety checks to prevent accidental data loss. Released regularly with fixes and updates. Differentiates from generic migration tools by understanding Supabase's specific object types (auth, storage, realtime) and offering cleanup commands for orphaned records.
npm install supabase-migratorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the migrator with a Supabase client, runs migrations with dry-run, then performs backup and cleanup.
Upgrade @supabase/supabase-js to version 2+.
Always test on a staging database first.
Replace `import supabaseMigrator from 'supabase-migrator'` with `import { supabaseMigrator } from 'supabase-migrator'`.Use Supabase Admin API to manage realtime subscriptions.
import { supabaseMigrator } from 'supabase-migrator';Add "type": "module" to package.json and use import syntax.
Ensure createClient is called with valid SUPABASE_URL and SUPABASE_KEY.
Use migrator.rollback() to revert the migration or set force: true.