async def drop_tables(conn: SAConnection) -> None: for table in reversed(tables): try: await conn.execute(DropTable(table)) except psycopg2.ProgrammingError: pass for enum in enums: try: await conn.execute(DropEnumType(enum)) except psycopg2.ProgrammingError: pass
async def drop_async(self, bind=None, checkfirst=True): if not checkfirst or \ await bind.dialect.has_type(bind, self.name, schema=self.schema): await bind.status(DropEnumType(self))