summaryrefslogtreecommitdiff
path: root/migrate/changeset/databases/postgres.py
diff options
context:
space:
mode:
authorpercious17 <unknown>2008-11-26 22:05:19 +0000
committerpercious17 <unknown>2008-11-26 22:05:19 +0000
commitc7cbde7fea78c48b4fab51c59dbfa1d594bdc680 (patch)
tree7f514614d15f2a605a271b899b86db590dccd6d5 /migrate/changeset/databases/postgres.py
parentd6d4b511a48850c6d06df194887e27bb147a050e (diff)
downloadsqlalchemy-migrate-c7cbde7fea78c48b4fab51c59dbfa1d594bdc680.tar.gz
added hook functions which allow the dialects to specify how to indicate identifiers, as this is different in postgres.
Also, this fix includes a fix for modification of columns which have tables definied within a schema. This was also broken in postgres.
Diffstat (limited to 'migrate/changeset/databases/postgres.py')
-rw-r--r--migrate/changeset/databases/postgres.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/migrate/changeset/databases/postgres.py b/migrate/changeset/databases/postgres.py
index adbd3fb..4cba777 100644
--- a/migrate/changeset/databases/postgres.py
+++ b/migrate/changeset/databases/postgres.py
@@ -5,13 +5,22 @@ from sqlalchemy.databases import postgres as sa_base
PGSchemaGenerator = sa_base.PGSchemaGenerator
class PGColumnGenerator(PGSchemaGenerator,ansisql.ANSIColumnGenerator):
- pass
+ def _do_quote_table_identifier(self, identifier):
+ return identifier
+
class PGColumnDropper(ansisql.ANSIColumnDropper):
pass
+
class PGSchemaChanger(ansisql.ANSISchemaChanger):
- pass
+ def _do_quote_table_identifier(self, identifier):
+ return identifier
+ def _do_quote_column_identifier(self, identifier):
+ return '"%s"'%identifier
+
+
class PGConstraintGenerator(ansisql.ANSIConstraintGenerator):
pass
+
class PGConstraintDropper(ansisql.ANSIConstraintDropper):
pass