Fix test
This commit is contained in:
parent
eef20a33b9
commit
2c34d4474a
|
@ -981,17 +981,17 @@ func (db *postgres) CreateTableSQL(table *schemas.Table, tableName string) ([]st
|
|||
s, _ := ColumnString(db, col, col.IsPrimaryKey && len(table.PrimaryKeys) == 1)
|
||||
b.WriteString(s)
|
||||
|
||||
if len(table.PrimaryKeys) > 1 {
|
||||
b.WriteString("PRIMARY KEY ( ")
|
||||
b.WriteString(quoter.Join(table.PrimaryKeys, ","))
|
||||
b.WriteString(" )")
|
||||
}
|
||||
|
||||
if i != len(table.ColumnsSeq())-1 {
|
||||
b.WriteString(", ")
|
||||
}
|
||||
}
|
||||
|
||||
if len(table.PrimaryKeys) > 1 {
|
||||
b.WriteString(", PRIMARY KEY (")
|
||||
b.WriteString(quoter.Join(table.PrimaryKeys, ","))
|
||||
b.WriteString(")")
|
||||
}
|
||||
|
||||
b.WriteString(")")
|
||||
|
||||
return []string{b.String()}, false
|
||||
|
|
Loading…
Reference in New Issue