|
Hi, is there a way to specify table collation in Prisma schema? -- CreateTable
CREATE TABLE `User` (
`id` INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;However I want to use Thanks. |
Replies: 3 comments 6 replies
|
Hey @ryym 👋 The best workaround for now would be set the database collation to So the steps would be:
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 :) |
|
For everyone I just created a feature request ticket for this: #16781 |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
Hey @ryym 👋
The best workaround for now would be set the database collation to
utf8mb4_binand to remove the collation on all tables that Migrate creates before applying the migration.So the steps would be:
prisma migrate dev --create-only --preview-featureto create the migrations.character setchanges added by Prismaprisma migrate dev --preview-featureto apply all migrationsThis 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 :)