Sort numbers as ints rather than strings
Describe the bug Currently, it looks like model names are sorted solely as strings. It'd be nice if numbers were sorted as ints. Right now 14Kakuna sorts after 149dragonite (or if there was a way to mass add leading 0s).
To Reproduce Steps to reproduce the behavior:
- Make a model named 14Kakuna and 149dragonite.
- See that Kakuna sorts before dragonite.
Expected behavior 14Kakuna sorts before 149dragonite.
Changing to feature rather than bug, but yes, I agree, that's a good shout. At the moment all sorting is done by the database, I wonder if there's a way we can make it numeral-aware...
https://dba.stackexchange.com/questions/285222/how-to-treat-numbers-within-strings-as-numbers-when-sorting-a3-sorts-before
https://dbfiddle.uk/cptUkufH
https://www.postgresql.org/docs/12/collation.html#id-1.6.10.4.5.7.5