cli icon indicating copy to clipboard operation
cli copied to clipboard

db diff cannot detect enum values added via ALTER TYPE ADD VALUE

Open ProjectINT opened this issue 2 months ago • 0 comments

Describe the bug npx supabase db diff generates migration to recreate enum type, even though values were already added successfully using ALTER TYPE ... ADD VALUE.

To Reproduce

  1. Use declarative schema enum
  2. Create migration with "npx supabase migration new ..." with add enum values using ALTER TYPE vehicleCategory ADD VALUE 'newValue'
  3. Apply migration successfully to remote database
  4. Run npx supabase db diff
  5. Diff generates full enum recreation instead of recognizing existing values

Expected behavior Diff should detect enum already has all required values and generate no migration.

ProjectINT avatar Dec 15 '25 16:12 ProjectINT