next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

re-running seed script inserts duplicate invoices

Open murfett-au opened this issue 1 year ago • 0 comments

Each time npm run seed is executed, an extra 15 rows are inserted into the invoices table.

This is because:

  1. no member of the invoices array exported from the placeholder include invoices[n].id; and
  2. The id field is not included in the sql insert statement in the seed.ts script.

I have created https://github.com/vercel/next-learn/pull/537 to address these issues.

murfett-au avatar Jan 03 '24 02:01 murfett-au