Skip to content

DB Schema Creation Error using PostgreSQL #308

@Proxymiity

Description

@Proxymiity

When initializing the database with Postgres, the relation IX_Username_1 is already used on admin (username):

CREATE TABLE admin (id BIGINT NOT NULL, username VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, super BOOLEAN DEFAULT 'false' NOT NULL, active BOOLEAN DEFAULT 'true' NOT NULL, created TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, modified TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX IX_Username_1 ON admin (username);
[...]
CREATE UNIQUE INDEX IX_Username_1 ON mailbox (username);

This causes the following error: [42P07] ERROR: relation "ix_username_1" already exists.

Using orm:schema-tool:create --dump-sql and changing the relation to ix_username_2 solves the problem.

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