10 does come before 1 when sorted in "ASCII-betical" order. It
would be better to name your files like this:
0001-firstfile.sql
0002-secondfile.sql