'Returns the SQL required to create a single model, as a tuple of:
(list_of_sql, pending_references_dict)'

def sql_create_model(self, model, style, known_models=set()):

    opts = model._meta
    if ((not opts.managed) or opts.proxy or opts.swapped):
        return ([], {})
    final_output = []
    table_output = []
    pending_references = {}
    qn = self.connection.ops.quote_name
    for f in opts.local_fields:
        col_type = f.db_type(connection=self.connection)
        tablespace = (f.db_tablespace or opts.db_tablespace)
        if (col_type is None):
            continue
        field_output = [style.SQL_FIELD(qn(f.column)), style.SQL_COLTYPE(col_type)]
        null = f.null
        if (f.empty_strings_allowed and (not f.primary_key) and self.connection.features.interprets_empty_strings_as_nulls):
            null = True
        if (not null):
            field_output.append(style.SQL_KEYWORD('NOT    NULL'))
        if f.primary_key:
            field_output.append(style.SQL_KEYWORD('PRIMARY    KEY'))
        elif f.unique:
            field_output.append(style.SQL_KEYWORD('UNIQUE'))
        if (tablespace and f.unique):
            tablespace_sql = self.connection.ops.tablespace_sql(tablespace, inline=True)
            if tablespace_sql:
                field_output.append(tablespace_sql)
        if f.rel:
            (ref_output, pending) = self.sql_for_inline_foreign_key_references(f, known_models, style)
            if pending:
                pending_references.setdefault(f.rel.to, []).append((model, f))
            else:
                field_output.extend(ref_output)
        table_output.append('    '.join(field_output))
    for field_constraints in opts.unique_together:
        table_output.append((style.SQL_KEYWORD('UNIQUE') + ('    (%s)' % ',    '.join([style.SQL_FIELD(qn(opts.get_field(f).column)) for f in field_constraints]))))
    full_statement = [(((style.SQL_KEYWORD('CREATE    TABLE') + '    ') + style.SQL_TABLE(qn(opts.db_table))) + '    (')]
    for (i, line) in enumerate(table_output):
        full_statement.append(('                %s%s' % (line, (((i < (len(table_output) - 1)) and ',') or ''))))
    full_statement.append(')')
    if opts.db_tablespace:
        tablespace_sql = self.connection.ops.tablespace_sql(opts.db_tablespace)
        if tablespace_sql:
            full_statement.append(tablespace_sql)
    full_statement.append(';')
    final_output.append('\n'.join(full_statement))
    if opts.has_auto_field:
        auto_column = (opts.auto_field.db_column or opts.auto_field.name)
        autoinc_sql = self.connection.ops.autoinc_sql(opts.db_table, auto_column)
        if autoinc_sql:
            for stmt in autoinc_sql:
                final_output.append(stmt)
    return (final_output, pending_references)
