Skip to content
Discussion options

You must be logged in to vote

Hey @ryym 👋

The best workaround for now would be set the database collation to utf8mb4_bin and to remove the collation on all tables that Migrate creates before applying the migration.

So the steps would be:

  1. Run prisma migrate dev --create-only --preview-feature to create the migrations.
  2. Add the alter database command to the migration to set to your required collation and remove all character set changes added by Prisma
  3. Run prisma migrate dev --preview-feature to apply all migrations

This will take the collation of the database by default in all further cases. Let me know if that works :)

Also I would suggest creating a feature request to specify table collation for Migrate here :)

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@Kosta-Github
Comment options

@shtse8
Comment options

@ryym
Comment options

@fkrauthan
Comment options

@drichardcarl
Comment options

Answer selected by ryym
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants