SQL Server connector only allows globally unique index names
See original GitHub issueAfter running introspect
, prisma is throwing this error because of the index names. This might cause issues to keep evolving the model moving forward because the migrations would go crazy with the indexes 😬
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
sql server - name of index need to be unique in database?
Is the name of the index. Index names must be unique within a table or view but do not have to be unique...
Read more >Create Unique Indexes - SQL Server - Microsoft Learn
This topic describes how to create a unique index on a table in SQL Server by using SQL Server Management Studio or Transact-SQL....
Read more >Microsoft SQL Server - Prisma
Microsoft SQL Server only allows one NULL value in a column that has a UNIQUE constraint. For example: A table of users has...
Read more >Creating Tables - SQL Server to Aurora MySQL Migration ...
When creating a new table using SELECT INTO , the only attributes created for the new table are column names, column order, and...
Read more >SQL error messages and exceptions - Oracle Help Center
08001, A connection could not be established because the server name ... caused a duplicate key value in a unique or primary key...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And it should be fixed 😄
Right, the error message complains about “globally unique”. That does not seem to be true for SQL Server, while it is probably true for some other database.
Code for this: https://github.com/prisma/prisma-engines/blob/789a706435edd011021ae544bad8e2bf582efd9f/libs/datamodel/core/src/transform/ast_to_dml/validate.rs#L216-L252 So
supports_multiple_indexes_with_same_name()
is wrong for the SQLServer connector probably.