While running dev: What could cause validation error with old field name?
I get complain about field "menu-name", but I changed to "menu_name" a little while ago, and can't no longer find references to "menu-name" in my codebase.
Already deleted: node_modules/.cache/webpack
Is the previous field name in the database?
That's the first place I would check when changing data structures, unless you added no data ofc @spacehill
Probably you still have the index of that field in your mongodb. Use
mongosh
and connect to your databse, from there use
db.<collection>.getIndexedes()
and if you still see the associated index just drop it 🙂
if you prefer a GUI like me, compass is solid
https://www.mongodb.com/products/compassThank you guys! Old index was still there. Seems to be all good now after deleting it 👍 And yeah, using the Compass, pretty handy
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.