#[TypeError: Cannot read properties of undefined (reading 'columns')]

1 messages · Page 1 of 1 (latest)

silent mica
#

Hello 👋

  • I have 2 collections Companies and Media.
  • Companies has a relation to Media for uploading logos.
  • Both tables have data in them and they work great!

I'm trying to rename Media to Logos and I get this:

[✓] Pulling schema from database...

Is payloadcms.logos table created or renamed from another table?

  • payloadcms.logos create table
    ❯ ~ payloadcms.media › payloadcms.logos rename table

I choose second option

~ payloadcms.media › payloadcms.logos table will be renamed/moved
--- all table conflicts resolved ---

and then I get this:

Is logos_id column in payload_locked_documents_rels table created or renamed from another column?

  • logos_id create column
    ❯ ~ media_id › logos_id rename column

I choose second option

~ media_id › logos_id column will be renamed
--- all columns conflicts in payload_locked_documents_rels table resolved ---

and then I get this:

⨯ [TypeError: Cannot read properties of undefined (reading 'columns')] {
payloadInitError: true,
digest: '568600809'
}
⨯ [TypeError: Cannot read properties of undefined (reading 'columns')] {
payloadInitError: true,
digest: '568600809'
}
⨯ [TypeError: Cannot read properties of undefined (reading 'columns')] {
payloadInitError: true,
digest: '568600809'
}

All my packages are on 3.49.1

What could be the problem?

Thank you!

opal pewter
#

Have you checked in your database if the tables have actually been renamed and have your old content?

silent mica
#

No. When I try to do it again it gives me the same questions.