File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1313 FileClass schema where previously the "content" property was faked and
1414 "type" was optional)
1515- verbose output during import is optional now (sf bug 1475624)
16+ - escape *all* uses of "schema" in mysql backend (sf bug 1472120)
1617
1718
18192006-03-03 1.1.1
Original file line number Diff line number Diff line change 1- #$Id: back_mysql.py,v 1.67 2006-03-03 01:02:26 richard Exp $
1+ #$Id: back_mysql.py,v 1.68 2006-04-27 03:40:42 richard Exp $
22#
33# Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <[email protected] > 44#
@@ -66,7 +66,7 @@ def db_nuke(config):
6666 tables = cursor .fetchall ()
6767 # stupid MySQL bug requires us to drop all the tables first
6868 for table in tables :
69- command = 'DROP TABLE %s ' % table [0 ]
69+ command = 'DROP TABLE `%s` ' % table [0 ]
7070 if __debug__ :
7171 logging .getLogger ('hyperdb' ).debug (command )
7272 cursor .execute (command )
@@ -183,6 +183,13 @@ def load_dbschema(self):
183183 else :
184184 self .database_schema = {}
185185
186+ def save_dbschema (self ):
187+ ''' Save the schema definition that the database currently implements
188+ '''
189+ s = repr (self .database_schema )
190+ self .sql ('delete from `schema`' )
191+ self .sql ('insert into `schema` values (%s)' , (s ,))
192+
186193 def create_version_2_tables (self ):
187194 # OTK store
188195 self .sql ('''CREATE TABLE otks (otk_key VARCHAR(255),
You can’t perform that action at this time.
0 commit comments