changeset 524:c022478bc111

Replace `CREATE TEMP TABLE` with the more database-independent `CREATE TEMP TABLE` (thanks Manfred) - Fixes #370
author dfraser
date Mon, 16 Mar 2009 17:46:18 +0000
parents a89925df9d88
children bb448ad9bf35
files bitten/upgrades.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/upgrades.py
+++ b/bitten/upgrades.py
@@ -37,7 +37,7 @@
         build_log.messages = [(BuildLog.INFO, msg) for msg in log.splitlines()]
         build_log.insert(db)
 
-    cursor.execute("CREATE TEMP TABLE old_step AS SELECT * FROM bitten_step")
+    cursor.execute("CREATE TEMPORARY TABLE old_step AS SELECT * FROM bitten_step")
     cursor.execute("DROP TABLE bitten_step")
     for table in BuildStep._schema:
         for stmt in connector.to_sql(table):
@@ -52,7 +52,7 @@
     from bitten.model import BuildConfig
     cursor = db.cursor()
 
-    cursor.execute("CREATE TEMP TABLE old_config AS "
+    cursor.execute("CREATE TEMPORARY TABLE old_config AS "
                    "SELECT * FROM bitten_config")
     cursor.execute("DROP TABLE bitten_config")
 
@@ -116,7 +116,7 @@
     from bitten.model import BuildLog
     cursor = db.cursor()
 
-    cursor.execute("CREATE TEMP TABLE old_log AS "
+    cursor.execute("CREATE TEMPORARY TABLE old_log AS "
                    "SELECT * FROM bitten_log")
     cursor.execute("DROP TABLE bitten_log")
 
@@ -288,7 +288,7 @@
     from bitten.model import BuildLog
     cursor = db.cursor()
 
-    cursor.execute("CREATE TEMP TABLE old_log AS "
+    cursor.execute("CREATE TEMPORARY TABLE old_log AS "
                    "SELECT * FROM bitten_log")
     cursor.execute("DROP TABLE bitten_log")
 
Copyright (C) 2012-2017 Edgewall Software