dialect/sql/schema: add field collation support (#1548)

* specific field collation support

* go generate ./...
This commit is contained in:
Mahmudul Haque
2021-05-09 21:09:08 +06:00
committed by GitHub
parent a2a6af4cd8
commit ba954ebeec
6 changed files with 52 additions and 2 deletions

View File

@@ -284,6 +284,8 @@ func (d *MySQL) addColumn(c *Column) *sql.ColumnBuilder {
if c.Increment {
b.Attr("AUTO_INCREMENT")
}
c.collation(b)
c.nullable(b)
c.defaultValue(b)
if c.Type == field.TypeJSON {