Edgewall Software

Changes between Initial Version and Version 1 of Ticket #9612, comment 56


Ignore:
Timestamp:
Jan 3, 2017, 8:42:13 PM (3 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9612, comment 56

    initial v1  
    66--- trac/db/api.py      (revision 15318)
    77+++ trac/db/api.py      (working copy)
    8 @@ -423,12 +423,12 @@
     8@@ -423,15 +423,15 @@
    99
    1010         :since: version 1.2
     
    1717-            with self.env.db_transaction as db:
    1818+        with self.env.db_transaction as db:
     19+            cursor = db.cursor()
    1920+            for new_table in new_schema:
    2021+                temp_table_name = new_table.name + '_old'
     
    2425                 cols_to_copy = ','.join(db.quote(name)
    2526                                         for name in column_names)
    26                  cursor = db.cursor()
     27-                cursor = db.cursor()
     28                 cursor.execute("""
     29                     CREATE TEMPORARY TABLE %s AS SELECT * FROM %s
     30                     """ % (db.quote(temp_table_name),
    2731}}}