After running a clean install the DB seems to be initialised OK, but when gogs is restarted I get the following error:
[...s/routers/install.go:71 GlobalInit()] [E] Fail to initialize ORM engine: sync database struct error: pq: relation "UQE_user_lower_name" already exists
I tried dropping the user table to see if it would be regenerated (which it is), but then gogs falls over with:
[...s/routers/install.go:71 GlobalInit()] [E] Fail to initialize ORM engine: sync database struct error: pq: relation "IDX_public_key_owner_id" already exists
Looking at the logs (linked above) it seems as though the indexes are trying to be created even though they already exist.