misc/migration/3.21.0_Any.py
changeset 10626 93f8d239c708
parent 10556 8fbff2247816
child 10628 8f32cdc3f4ec
--- a/misc/migration/3.21.0_Any.py	Tue Sep 29 15:11:29 2015 +0200
+++ b/misc/migration/3.21.0_Any.py	Tue Sep 29 15:15:03 2015 +0200
@@ -103,7 +103,10 @@
 helper = repo.system_source.dbhelper
 
 helper.drop_index(cu, 'entities', 'extid', False)
-helper.create_index(cu, 'entities', 'extid', True)
+# don't use create_index because it doesn't work for columns that may be NULL
+# on sqlserver
+for query in helper.sqls_create_multicol_unique_index('entities', ['extid']):
+    cu.execute(query)
 
 if 'moved_entities' not in helper.list_tables(cu):
     sql('''