From a36da2fcbb65b033b6af45b2c4eea17e853a4d9c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 1 Mar 2013 09:13:34 +0000 Subject: [PATCH] fix changing clip layers --- pandora/item/management/commands/sync_itemsort.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/item/management/commands/sync_itemsort.py b/pandora/item/management/commands/sync_itemsort.py index 952228427..067a011e1 100644 --- a/pandora/item/management/commands/sync_itemsort.py +++ b/pandora/item/management/commands/sync_itemsort.py @@ -89,8 +89,12 @@ class Command(BaseCommand): sql = 'CREATE INDEX "%s_%s_idx" ON "%s" ("%s")' % (table_name, name, table_name, name) changes.append(sql) + sql = 'COMMIT' + changes.append(sql) sql = 'ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (table_name, name) changes.append(sql) + sql = 'BEGIN' + changes.append(sql) if changes: print "Database needs to be updated, plase wait..." for sql in changes: