mirror of
https://github.com/ent/ent.git
synced 2026-05-06 01:20:56 +03:00
ent/migrate: correctly handle column collation change
Summary: In addition coulmn description on create / alter table to use 'CHARACTER SET' keyword instead of 'CHARSET' per mysql docs (https://dev.mysql.com/doc/refman/5.7/en/charset-column.html) Reviewed By: a8m Differential Revision: D17090725 fbshipit-source-id: d0f53a547ff8d68f2b2b54af96ef5b86f60f74b4
This commit is contained in:
committed by
Facebook Github Bot
parent
9207ab5bb1
commit
011e6d24ae
@@ -281,7 +281,7 @@ func (m *Migrate) changeSet(curr, new *Table) (*changes, error) {
|
||||
case c1.Nullable != c2.Nullable:
|
||||
fallthrough
|
||||
// modify character encoding.
|
||||
case c1.Charset != "" && c1.Charset != c2.Charset || c1.Collation != "" && c1.Charset != c2.Collation:
|
||||
case c1.Charset != "" && c1.Charset != c2.Charset || c1.Collation != "" && c1.Collation != c2.Collation:
|
||||
change.column.modify = append(change.column.modify, c1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user