Kia ora!
I'm running payload via the Astroad docker containers, and am struggling to get migrations working.
I initially had a unique 'slug' field in some collections I realised I didn't need, so I removed it from my payload config. I'm running into issues (getting the 'slug not unique' error) so I assume MongoDB is unhappy because it's still expecting a unique slug. I want to run a migration to remove this field totally.
However, after adding the 'payload' script to package.json, trying to run 'npm run payload migrate' gives me a 'missing script: "payload"' error.
I'm running payload 2.1
This script should be included in all of our templates.
If you happen to not have it, this is what needs to exist in your package.json's scripts (or similar):
{
"scripts": {
"payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload"
}
}
Some more detail here if you need it:
https://github.com/payloadcms/payload/releases/tag/v2.0.0Star
Discord
online
Get dedicated engineering support directly from the Payload team.