Skip to content

server_tool_id_seq not incrementing when we insert a tool manually #6

@JasperWallace

Description

@JasperWallace

When we import the tools from the old acserver we insert the tool data into server_tool, including the id column, which we need to preserve.

As a result server_tool_id_seq does not get incremented (it starts at 1) and when trying to add a tool django dies with:

IntegrityError: duplicate key value violates unique constraint "server_tool_pkey"
DETAIL: Key (id)=(3) already exists.

in the logs.

I've manualy run:

select nextval('server_tool_id_seq'::regclass);

in postgres until server_tool_id_seq is outside the range of existing acnode id's so this issue is worked around for now, but we might encounter similar problems at some point.

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