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:Jump to solution
Handling table and column renames — PlanetScale Documentation
How to manage table and column renames with online DDL and no downtime
2 Replies
Solution
this is planetscales docs
https://planetscale.com/docs/learn/handling-table-and-column-renames
Handling table and column renames — PlanetScale Documentation
How to manage table and column renames with online DDL and no downtime
@Sybatron Thanks for the answer, I guess there isn't a straightforward way to do this, but it's a pretty niche case anyway.