Best practices for data migrations/historical data changes?
I'm using t3 + Vercel + Planetscale and would like to add a field like
So I need to generate tokens for my existing users.
user.apiToken as an example. A new field that every user should have pre-generated and ready to useSo I need to generate tokens for my existing users.
- Prisma migrations are SQL-only by default (right?) so that doesn't play nice
- Planetscale doesn't really like Prisma migrations anyway
scripts/ directory and figuring out to run something like that against Vercel? Maybe a temporary API endpoint? What's a good best practice for one-off data migrations like this?