Simplify Renaming a Field in Prisma Schema with PlanetScale

I'm looking to rename a field in my Prisma schema while using PlanetScale. For instance, I'd like to change authorId to userId. I'd like to achieve this without losing any existing data in the field. Normally, creating a custom Prisma migration file would be the way to go, but due to the incompatibility between Prisma Migrate and PlanetScale, it appears there isn't a straightforward approach. Is there an easier solution that preserves data and works seamlessly with PlanetScale?
Solution:
Handling table and column renames — PlanetScale Documentation
How to manage table and column renames with online DDL and no downtime
Jump to solution
2 Replies
Solution
Sybatron
Sybatron14mo ago
Handling table and column renames — PlanetScale Documentation
How to manage table and column renames with online DDL and no downtime
Bearsy
Bearsy14mo ago
@Sybatron Thanks for the answer, I guess there isn't a straightforward way to do this, but it's a pretty niche case anyway.
Want results from more Discord servers?
Add your server
More Posts