Skip to content

Commit

Permalink
fix commas
Browse files Browse the repository at this point in the history
Fixes a bug where necessary commas were not created for mysql
migrations.
  • Loading branch information
dotvezz committed Jun 13, 2021
1 parent 8ff03f5 commit 76ba3be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/dbms/mysql/adapter_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ func (a *adapter) CreateTable(tName string, t schema.Table) string {
)
for _, c := range t.Columns {
if !first {
sb.WriteString(",\n")
sb.WriteString("\n")
} else {
first = false
}
sb.WriteString(" ")
sb.WriteString(a.generateColumn(c.Name, c))
sb.WriteRune(',')
if c.PrimaryKey {
pks = append(pks, c.Name)
}
Expand Down

0 comments on commit 76ba3be

Please sign in to comment.