Skip to content

Migration 104 failing due to attribute_pk_seq out of step with table #378

@cailyoung

Description

@cailyoung
error: migration failed: duplicate key value violates unique constraint "attribute_pk", Key (id)=(17) already exists. in line 0: WITH inserted_attribute AS (
    INSERT INTO attribute (name)
    VALUES ('analyzer.largestRetryPriority')
    RETURNING id
)
INSERT INTO project_attribute
SELECT inserted_attribute.id, FALSE, project.id
FROM project, inserted_attribute; (details: pq: duplicate key value violates unique constraint "attribute_pk")

Looking at the migration history it's possible we have up-and-down migrated this preprod environment in ways that could lead to the sequence getting out of whack with the actual contents of the attribute table.

Without a way to reset the sequence properly we can't upgrade.

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