2009-01-25 12:52:33 +00:00
|
|
|
"""
|
|
|
|
`PostgreSQL`_ database specific implementations of changeset classes.
|
|
|
|
|
|
|
|
.. _`PostgreSQL`: http://www.postgresql.org/
|
|
|
|
"""
|
2011-10-28 10:59:10 +02:00
|
|
|
from migrate.changeset import ansisql
|
|
|
|
|
|
|
|
from sqlalchemy.databases import postgresql as sa_base
|
|
|
|
PGSchemaGenerator = sa_base.PGDDLCompiler
|
2008-02-06 18:39:07 +00:00
|
|
|
|
2009-01-25 12:52:33 +00:00
|
|
|
|
2009-06-11 22:27:38 +00:00
|
|
|
class PGColumnGenerator(PGSchemaGenerator, ansisql.ANSIColumnGenerator):
|
2009-01-25 12:52:33 +00:00
|
|
|
"""PostgreSQL column generator implementation."""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2009-06-11 22:27:38 +00:00
|
|
|
class PGColumnDropper(ansisql.ANSIColumnDropper):
|
2009-01-25 12:52:33 +00:00
|
|
|
"""PostgreSQL column dropper implementation."""
|
|
|
|
pass
|
|
|
|
|
2008-11-26 22:05:19 +00:00
|
|
|
|
2009-06-11 22:27:38 +00:00
|
|
|
class PGSchemaChanger(ansisql.ANSISchemaChanger):
|
2009-01-25 12:52:33 +00:00
|
|
|
"""PostgreSQL schema changer implementation."""
|
|
|
|
pass
|
2008-12-02 15:25:12 +00:00
|
|
|
|
2008-12-02 15:41:25 +00:00
|
|
|
|
2009-06-11 22:27:38 +00:00
|
|
|
class PGConstraintGenerator(ansisql.ANSIConstraintGenerator):
|
2009-01-25 12:52:33 +00:00
|
|
|
"""PostgreSQL constraint generator implementation."""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2009-06-11 22:27:38 +00:00
|
|
|
class PGConstraintDropper(ansisql.ANSIConstraintDropper):
|
2009-01-25 12:52:33 +00:00
|
|
|
"""PostgreSQL constaint dropper implementation."""
|
|
|
|
pass
|
|
|
|
|
2008-02-06 18:39:07 +00:00
|
|
|
|
|
|
|
class PGDialect(ansisql.ANSIDialect):
|
|
|
|
columngenerator = PGColumnGenerator
|
|
|
|
columndropper = PGColumnDropper
|
|
|
|
schemachanger = PGSchemaChanger
|
|
|
|
constraintgenerator = PGConstraintGenerator
|
|
|
|
constraintdropper = PGConstraintDropper
|