#Database seeding not fully completing with PSQL DB?

3 messages · Page 1 of 1 (latest)

wanton masonBOT
kind delta
#

Update:

Commented out the following in src/endpoints/seed/index.ts

  await Promise.all([
    payload.update({
      id: post1Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post2Doc.id, post3Doc.id],
      },
    }),
    payload.update({
      id: post2Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post1Doc.id, post3Doc.id],
      },
    }),
    payload.update({
      id: post3Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post1Doc.id, post2Doc.id],
      },
    }),
  ])  // update each post with related posts
  await Promise.all([
    payload.update({
      id: post1Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post2Doc.id, post3Doc.id],
      },
    }),
    payload.update({
      id: post2Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post1Doc.id, post3Doc.id],
      },
    }),
    payload.update({
      id: post3Doc.id,
      collection: 'posts',
      data: {
        relatedPosts: [post1Doc.id, post2Doc.id],
      },
    }),
  ])```

and have a successful seed using postgres

``` ○ Compiling /next/seed ...
 ✓ Compiled /next/seed in 613ms (5936 modules)
[10:59:30] INFO: Seeding database...
[10:59:30] INFO: — Clearing collections and globals...
[10:59:30] INFO: — Seeding demo author and user...
[10:59:30] INFO: — Seeding media...
[10:59:32] INFO: — Seeding posts...
[10:59:32] INFO: — Seeding contact form...
[10:59:32] INFO: — Seeding pages...
[10:59:32] INFO: Revalidating page at path: /contact
[10:59:32] INFO: Revalidating page at path: /
[10:59:32] INFO: — Seeding globals...
[10:59:32] INFO: Revalidating footer
[10:59:32] INFO: Revalidating header
[10:59:32] INFO: Seeded database successfully!
 POST /next/seed 200 in 2402ms```
#

If anyone can confirm this is an issue / reproduce the issue locally I'll open a github issue for it