#After Payload 2.0.4 update collections where drafts are available don't show old docs, but only new

1 messages · Page 1 of 1 (latest)

leaden trout
#

When I disable drafts it shows all the docs in admin, when I enable back the drafts for the collection it doesn't show docs created before the update, but only the ones created after update.

alpine grottoBOT
warm abyss
#

Did you run the migration script?

#

Draft versions now require a latest: true property to be set on the most recent draft in your _versions collections(s)

leaden trout
#

Sorry, it didn't create full migration, just empty migration boilerplate. Should I manually finish the migration with code the adds latest: true field to newest drafts?

#

Or maybe the correct command should be or something like this?

npm run payload migrate:create --file @payloadcms/db-mongodb/predefinedMigrations/versions-v1-v2
#

Anyway, I found the code in the source code, and manually populated it into migration, but I don't feel like it applies it.

#

Oh, I figured it out. Sadly it didn't do down, so I had to create a fewsh migration, paste there migration code and then when i run it it did the job.

still token
#

@leaden trout did you run into the same error?

#

Im trying to migrate too, and I cant get it too work.

warm abyss
leaden trout
#

@warm abyss nothing, it created blank migration. It was useless try.

#

Maybe I had to specify absolute path instead of @ at the ebeginning but I didn't do that.

#

@still token no this wasn't my error

leaden trout
#

Btw I use Fedora linux and Docker.

still token
leaden trout