summaryrefslogtreecommitdiffstats
path: root/tools/upgrade/1.3
diff options
context:
space:
mode:
Diffstat (limited to 'tools/upgrade/1.3')
-rwxr-xr-xtools/upgrade/1.3/migrate_dbstats.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/upgrade/1.3/migrate_dbstats.py b/tools/upgrade/1.3/migrate_dbstats.py
index ed514289a..de8aef973 100755
--- a/tools/upgrade/1.3/migrate_dbstats.py
+++ b/tools/upgrade/1.3/migrate_dbstats.py
@@ -9,10 +9,10 @@ import time
import Bcfg2.Logger
import Bcfg2.Options
from django.db import connection, transaction, backend
-
from Bcfg2.Server.Admin import UpdateReports
from Bcfg2.Reporting import models as new_models
from Bcfg2.Reporting.utils import BatchFetch
+from Bcfg2.Reporting.Compat import transaction
from Bcfg2.Server.Reports.reports import models as legacy_models
logger = logging.getLogger(__name__)
@@ -36,7 +36,7 @@ def _quote(value):
return _our_backend.quote_name(value)
-@transaction.commit_on_success
+@transaction.atomic
def _migrate_perms():
"""helper"""
@@ -55,7 +55,7 @@ def _migrate_perms():
return fperms
-@transaction.commit_on_success
+@transaction.atomic
def _migrate_transaction(inter, entries, fperms):
"""helper"""
@@ -185,7 +185,7 @@ def _shove(old_table, new_table, columns):
cursor.close()
-@transaction.commit_on_success
+@transaction.atomic
def migrate_stage1():
logger.info("Migrating clients")
try: