Rename field

default discord avatar
Ronok
2 weeks ago
4

Is there any way to rename field and map the previous data on that field?

  • default discord avatar
    thisisnotchris
    2 weeks ago

    @Ronok I don't think that's a built-in feature, but you could certainly make a migration that updates the name of that field. Are you familiar with migrations?

  • default discord avatar
    Ronok
    2 weeks ago

    I can do db migration but was looking if there was a built-in feature

  • default discord avatar
    thisisnotchris
    2 weeks ago

    @Ronok Ah okay! I've had this happen before, I hope the process isn't too taxing. I wrote up a small doc on Migrations, sharing it here:

    https://gist.github.com/notchris/c5155073bbbb08a487b349c52f6823ae
  • default discord avatar
    Ronok
    2 weeks ago

    Thanks

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.