reorder database insert
Merge branch 'master' of https://github.com/slcnguye/domjudge