hooks/syncschema.py
changeset 10586 22f330f829ae
parent 10585 80236876ee4d
child 10640 17bdc485c5b2
--- a/hooks/syncschema.py	Wed Sep 23 15:00:33 2015 +0200
+++ b/hooks/syncschema.py	Wed Sep 23 15:01:55 2015 +0200
@@ -750,6 +750,13 @@
     entity = cstrname = None # for pylint
     cols = () # for pylint
 
+    def insert_index(self):
+        # We need to run before CWConstraintDelOp: if a size constraint is
+        # removed and the column is part of a unique_together constraint, we
+        # remove the unique_together index before changing the column's type.
+        # SQL Server does not support unique indices on unlimited text columns.
+        return 0
+
     def precommit_event(self):
         cnx = self.cnx
         prefix = SQL_PREFIX