The database initialization had a number of bugs for the first-time setup. This PR fixes them. Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/29 Co-authored-by: Greg Sarjeant <greg@subcultureofone.org> Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>