Skip to content

Fail to initialize ORM engine (Postgresql) - attempting to create indexes that exist? #3359

@jerrykan

Description

@jerrykan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions