def create(self, bucket, descriptor, force=False, indexes_fields=None):
<EOL>buckets = bucket<EOL>if isinstance(bucket, six.string_types):<EOL><INDENT>buckets = [bucket]<EOL><DEDENT>descriptors = descriptor<EOL>if isinstance(descriptor, dict):<EOL><INDENT>descriptors = [descriptor]<EOL><DEDENT>if indexes_fields is None or len(indexes_fields) == <NUM_LIT:0>:<EOL><INDENT>indexes_fields = [()] * len(descriptors)<EOL><DEDENT>elif type(indexes_fields[<NUM_LIT:0>][<NUM_LIT:0>]) not in {list, tuple}:<EOL><INDENT>indexes_fields = [indexes_fields]<EOL><DEDENT>if not (len(buckets) == len(descriptors) == len(indexes_fields)):<EOL><INDENT>raise tableschema.exceptions.StorageError('<STR_LIT>')<EOL><DEDENT>for bucket in reversed(self.buckets):<EOL><INDENT>if bucket in buckets:<EOL><INDENT>if not force:<EOL><INDENT>message = '<STR_LIT>' % bucket<EOL>raise tableschema.exceptions.StorageError(message)<EOL><DEDENT>self.delete(bucket)<EOL><DEDENT><DEDENT>for bucket, descriptor, index_fields in zip(buckets, descriptors, indexes_fields):<EOL><INDENT>tableschema.validate(descriptor)<EOL>table_name = self.__mapper.convert_bucket(bucket)<EOL>columns, constraints, indexes, fallbacks, table_comment = self.__mapper.convert_descriptor(bucket, descriptor, index_fields, self.__autoincrement)<EOL>Table(table_name, self.__metadata, *(columns + constraints + indexes),<EOL>comment=table_comment)<EOL>self.__descriptors[bucket] = descriptor<EOL>self.__fallbacks[bucket] = fallbacks<EOL><DEDENT>self.__metadata.create_all()<EOL>
https://github.com/frictionlessdata/tableschema-sql-py#storage