expanding bats tests

This commit is contained in:
Andy Arthur
2019-11-15 09:45:18 -08:00
parent 61a429fab6
commit 802ceb00aa
5 changed files with 31 additions and 11 deletions

View File

@@ -80,13 +80,14 @@ func SQLTableDIffs(ctx context.Context, r1, r2 *doltdb.RootValue) error {
b.WriteString(",\n")
}
seenOne := false
b.WriteString("\tPRIMARY KEY (")
b.WriteString(" PRIMARY KEY (")
for _, col := range sch.GetAllCols().GetColumns() {
if seenOne {
b.WriteString(",")
}
if col.IsPartOfPK {
if seenOne {
b.WriteString(",")
}
b.WriteString(sql.QuoteIdentifier(col.Name))
seenOne = true
}
}
b.WriteString(")")