diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 8275aa1e7..1a7f670a1 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -260,10 +260,16 @@ PGArray = ARRAY class ENUM(sqltypes.Enum): def create(self, bind=None, checkfirst=True): + if not bind.dialect.supports_native_enum: + return + if not checkfirst or not bind.dialect.has_type(bind, self.name, schema=self.schema): bind.execute(CreateEnumType(self)) def drop(self, bind=None, checkfirst=True): + if not bind.dialect.supports_native_enum: + return + if not checkfirst or bind.dialect.has_type(bind, self.name, schema=self.schema): bind.execute(DropEnumType(self)) |
