mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-25 08:39:30 +08:00
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.