Files
Alireza Heidari 421bded9c5 fix(migrations): do not select whole models in migration data fixes
UsernameDeduplicator generated the next free username with select(User), which
names every mapped column. It runs inside migration d619fdfa6168, so the mapped
model can carry columns that later revisions add and the schema at that point
does not have - making the statement fail against the very database it is
migrating.

Nothing currently added to galaxy_user post-dates that revision, so the fault is
latent: the SELECT only runs when duplicate usernames exist, and the loop is
skipped entirely otherwise. The next column added to that table turns a real
upgrade of any instance with duplicate usernames into a rollback, and the
migration wrapper reports success while doing it.

Selecting a single column is enough for the existence check and keeps the
statement independent of the model.
2026-09-03 14:50:57 +02:00
..