modcomms/backend/alembic/versions
michael 94a37f3ed8 Add migration to cleanup duplicate dropdown options
The staging database has duplicate sub-channels (5 "Meta", 2 "Magazine")
which causes the last duplicate (with 0 proof types) to overwrite the
correct one in the API response.

This migration:
1. Identifies duplicate sub-channels and channels
2. Keeps the one with the most children (proof types)
3. Deletes the duplicates
4. Adds unique partial indexes to prevent future duplicates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:22:44 -06:00
..
001_initial_schema.py permissions changes 2025-12-18 16:51:27 +00:00
002_seed_dropdown_options.py Seed database with agencies, brand guidelines, and dropdown options 2025-12-18 17:16:23 -06:00
003_add_meta_proof_types.py Add proof types for Meta sub-channel 2026-01-08 10:07:28 -06:00
004_cleanup_duplicate_dropdown_options.py Add migration to cleanup duplicate dropdown options 2026-01-23 13:22:44 -06:00