def has_table(self, connection, table_name, schema=None): try: self.get_columns(connection, table_name, schema) return True except NoSuchTableError: return False