Adding a new cuid()
column is difficult in with prisma because the CUID is generated at prisma layer and not at mysql layer.
Here are the scripts that will help you generate CUID in your migration file
- Make every .sql file in this gist as an individual migration {folder}/migration.sql file.
- Make sure to add the migrations in the order of dependency random_block -> cuid -> usage
- Run the migration 🚀