def delete(self, bucket=None, ignore=False):
<EOL>buckets = bucket<EOL>if isinstance(bucket, six.string_types):<EOL><INDENT>buckets = [bucket]<EOL><DEDENT>elif bucket is None:<EOL><INDENT>buckets = reversed(self.buckets)<EOL><DEDENT>tables = []<EOL>for bucket in buckets:<EOL><INDENT>if bucket not in self.buckets:<EOL><INDENT>if not ignore:<EOL><INDENT>message = '<STR_LIT>' % bucket<EOL>raise tableschema.exceptions.StorageError(message)<EOL><DEDENT>return<EOL><DEDENT>if bucket in self.__descriptors:<EOL><INDENT>del self.__descriptors[bucket]<EOL><DEDENT>table = self.__get_table(bucket)<EOL>tables.append(table)<EOL><DEDENT>self.__metadata.drop_all(tables=tables)<EOL>self.__metadata.clear()<EOL>self.__reflect()<EOL>
https://github.com/frictionlessdata/tableschema-sql-py#storage