The best way I've found to do this is to set the auto-increment value on the DB itself. The table you'd modify is 'case'. For instance, for MariaDB you...