]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
single space for MySQL appeasement
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Jun 2006 21:52:54 +0000 (21:52 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Jun 2006 21:52:54 +0000 (21:52 +0000)
CHANGES
lib/sqlalchemy/ansisql.py

diff --git a/CHANGES b/CHANGES
index d5bdb82b302bbe6b8601bfef7aae54f3bccc41f1..c4608bbf79a66b8d4f4d72293c2732fa15565b7a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,9 @@ otherwise still requires you explicitly remove the instance from
 the previous Session.
 - fixes to mapper compilation, checking for more error conditions
 - small fix to eager loading combined with ordering/limit/offset
+- utterly remarkable:  added a single space between 'CREATE TABLE'
+and '(<the rest of it>' since *thats how MySQL indicates a non-
+reserved word tablename.....* [ticket:206]
 
 0.2.3
 - overhaul to mapper compilation to be deferred.  this allows mappers
index 82abb95775ebf285b4d001bb13dbd062290cec95..78017bc9191042d261b4d08c4c5bca75ca18bd62 100644 (file)
@@ -606,7 +606,10 @@ class ANSISchemaGenerator(engine.SchemaIterator):
         raise NotImplementedError()
         
     def visit_table(self, table):
-        self.append("\nCREATE TABLE " + table.fullname + "(")
+        # the single whitespace before the "(" is significant
+        # as its MySQL's method of indicating a table name and not a reserved word.
+        # feel free to localize this logic to the mysql module
+        self.append("\nCREATE TABLE " + table.fullname + " (")
         
         separator = "\n"