You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This affects any migrations for SQL server which require indices to be dropped on a column before removal. Because of this, I suggest adding a dropIndex method to the dialects, which will pass through to dropConstraint on all except SQL Server. The corresponding addIndex method can be added as well, which will allow more precision during schema creation. I can PR this if you are good with the above approach?
I'm fine with the method name as well, but I think I'd also like dropConstraint to use to correct syntax on SQL Server. We should be able to detect when we are passed a TableIndex and parse accordingly.
The syntax it currently uses is correct for what SQL server considers to be a constraint ( e.g. Foreign Keys, Unique index ). The problem is that SQL Server does not see a simple non-clustered index on a column as a "constraint". To me it makes more sense to separate those methods, rather than change the method signature, since SQL Server sees a constraint and an index as different.
The text was updated successfully, but these errors were encountered: