How can my colleague and I collaborate in the same CMS using a shared database?
When I create a new field, he gets a prompt in his terminal asking if he wants to delete my entry, as his version of the code doesn’t yet include the new field.
Our current solution is to work with multiple databases, but that feels like overkill.
Im also curious about this
I would also like to know if there is a solution to this
Best practice in my experience is to use individual local DB's. And use DB migrations if data needs to be shared.
Its too easy to corrupt a table or nuke it, losing hours of work.
Maybe you could get away with it by practicing trunk based development - working on the same branch and pushing your schema changes as soon as you make them, but that seems like a dangerous recipe. And still requires your team to be in a position to pull those changes.
That could be a possible solution, but I still feel like the multiple databases are a bit overkill.
I do understand why its happening, but its a bit of a dealbreaker
I just created a PR that can solve it
https://github.com/payloadcms/payload/pull/8196you would have to introspect your database into a drizzle schema and pass it into
beforeSchemaInitThanks
@423216344302092288, gonna try it out when it's merged!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.