-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer unique constraints over indexes on SQL Server
Unique constraint and index do not differ in SQL Server today. The problem is if we create an index and try to drop a constraint, the drop fails. Currently if the unique is added when the table is created, we add constraint. If the table is altered with a unique constraint we create an index instead. Dropping this does not work. The PR makes altering the table with an `@unique` to use constraints instead of an index. Closes: prisma/prisma#14051
- Loading branch information
Julius de Bruijn
committed
Jun 29, 2022
1 parent
a460085
commit c68ecc8
Showing
2 changed files
with
91 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters