mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
Adding a composite index that leads with a foreign-key column lets InnoDB re-point the constraint at it and discard the implicit single-column index. Reversing 0122 then failed with "Cannot drop index 'ix_rom_user_user_rom': needed in a foreign key constraint" on `rom_user.user_id`, and would have on `screenshots.rom_id`. The downgrade now restores those two implicit indexes first, and a full up/down/up cycle leaves the schema byte-identical to a database that never ran the migration. Also sets `path_separator = os` in alembic.ini, silencing the deprecation warning about the legacy space/comma/colon path splitting. `prepend_sys_path` holds a single entry, so the behaviour is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgeQBXh6SJyxXVHSL5EuoF