Skip to content

Chapter 6: The lib file to seed the db contains duplicate ID values #1005

@Razr6

Description

@Razr6

in placeholder-data.ts 👍

{
id: '3958dc9e-712f-4377-85e9-fec4b6a6442a',
name: 'Delba de Oliveira',
email: 'delba@oliveira.com',
image_url: '/customers/delba-de-oliveira.png',
},
{
id: '3958dc9e-742f-4377-85e9-fec4b6a6442a',
name: 'Lee Robinson',
email: 'lee@robinson.com',
image_url: '/customers/lee-robinson.png',
},

because id must be unique, the db seeding fails, with the error (I am on Neon) of:

{
"error": {
"name": "PostgresError",
"severity_local": "ERROR",
"severity": "ERROR",
"code": "23505",
"detail": "Key (extname)=(uuid-ossp) already exists.",
"schema_name": "pg_catalog",
"table_name": "pg_extension",
"constraint_name": "pg_extension_name_index",
"file": "nbtinsert.c",
"line": "664",
"routine": "_bt_check_unique"
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions