Changes between Initial Version and Version 1 of Ticket #9612, comment 56
- Timestamp:
- Jan 3, 2017, 8:42:13 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9612, comment 56
initial v1 6 6 --- trac/db/api.py (revision 15318) 7 7 +++ trac/db/api.py (working copy) 8 @@ -423,1 2 +423,12@@8 @@ -423,15 +423,15 @@ 9 9 10 10 :since: version 1.2 … … 17 17 - with self.env.db_transaction as db: 18 18 + with self.env.db_transaction as db: 19 + cursor = db.cursor() 19 20 + for new_table in new_schema: 20 21 + temp_table_name = new_table.name + '_old' … … 24 25 cols_to_copy = ','.join(db.quote(name) 25 26 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), 27 31 }}}