Skip to content

where: { shop: undefined }: The entire table data was accidentally deleted #20169

@bithaolee

Description

@bithaolee

Bug description

let shop = undefined; // shop is variable, and in some cases, it may be undefined

await prisma.theme.deleteMany({
  where: {
    shop,
  }
})

I left out the shop parameter check, causing the shop to be undefined in some cases, triggering the deletion of the entire table. This operation of Prisma is very risky, I hope to improve it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions