summaryrefslogtreecommitdiff
path: root/migrate/changeset/databases/mysql.py
diff options
context:
space:
mode:
authorpercious17 <unknown>2008-12-02 05:11:36 +0000
committerpercious17 <unknown>2008-12-02 05:11:36 +0000
commit9f0bd657f41fad8f8737199f383564ceb0803336 (patch)
treecb01d2c60ff1890052ac30ab58658167bb829904 /migrate/changeset/databases/mysql.py
parent1909dc8888ee8f62c87b9b1bf026909ed7b710d2 (diff)
downloadsqlalchemy-migrate-9f0bd657f41fad8f8737199f383564ceb0803336.tar.gz
most of the tests are now working with nose.
Diffstat (limited to 'migrate/changeset/databases/mysql.py')
-rw-r--r--migrate/changeset/databases/mysql.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/migrate/changeset/databases/mysql.py b/migrate/changeset/databases/mysql.py
index 1a87ff3..aa65166 100644
--- a/migrate/changeset/databases/mysql.py
+++ b/migrate/changeset/databases/mysql.py
@@ -5,9 +5,15 @@ from sqlalchemy.databases import mysql as sa_base
MySQLSchemaGenerator = sa_base.MySQLSchemaGenerator
class MySQLColumnGenerator(MySQLSchemaGenerator,ansisql.ANSIColumnGenerator):
+ def _do_quote_table_identifier(self, identifier):
+ return '%s'%identifier
pass
class MySQLColumnDropper(ansisql.ANSIColumnDropper):
- pass
+ def _do_quote_table_identifier(self, identifier):
+ return '%s'%identifier
+ def _do_quote_column_identifier(self, identifier):
+ return '%s'%identifier
+
class MySQLSchemaChanger(MySQLSchemaGenerator,ansisql.ANSISchemaChanger):
def visit_column(self,delta):
keys = delta.keys()
@@ -34,8 +40,13 @@ class MySQLSchemaChanger(MySQLSchemaGenerator,ansisql.ANSISchemaChanger):
def visit_index(self,param):
# If MySQL can do this, I can't find how
raise exceptions.NotSupportedError("MySQL cannot rename indexes")
+ def _do_quote_table_identifier(self, identifier):
+ return '%s'%identifier
+
class MySQLConstraintGenerator(ansisql.ANSIConstraintGenerator):
- pass
+ def _do_quote_table_identifier(self, identifier):
+ return '%s'%identifier
+
class MySQLConstraintDropper(ansisql.ANSIConstraintDropper):
#def visit_constraint(self,constraint):
# if isinstance(constraint,sqlalchemy.schema.PrimaryKeyConstraint):
@@ -54,6 +65,9 @@ class MySQLConstraintDropper(ansisql.ANSIConstraintDropper):
self.append(constraint.name)
self.execute()
+ def _do_quote_table_identifier(self, identifier):
+ return '%s'%identifier
+
class MySQLDialect(ansisql.ANSIDialect):
columngenerator = MySQLColumnGenerator
columndropper = MySQLColumnDropper