mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
enable sql dialect option on integration env (#1014)
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1014 Pull Request resolved: https://github.com/facebookincubator/ent/pull/6 Reviewed By: alexsn Differential Revision: D15928002 fbshipit-source-id: 4b5a639405f218f6b6cc90d152380d2fc9525a3f
This commit is contained in:
committed by
Facebook Github Bot
parent
970a410b31
commit
5ca9494121
@@ -170,7 +170,7 @@ func changeSet(curr, new *Table) (*Table, error) {
|
||||
case !ok:
|
||||
changes.Columns = append(changes.Columns, c1)
|
||||
case c1.Type != c2.Type:
|
||||
return nil, fmt.Errorf("changing column type for %q is invalid", c1.Name)
|
||||
return nil, fmt.Errorf("changing column type for %q is invalid (%s != %s)", c1.Name, c1.Type, c2.Type)
|
||||
case c1.Unique != c2.Unique:
|
||||
return nil, fmt.Errorf("changing column cardinality for %q is invalid", c1.Name)
|
||||
}
|
||||
|
||||
@@ -226,6 +226,8 @@ func (c *Column) ScanMySQL(rows *sql.Rows) error {
|
||||
}); parts[0] {
|
||||
case "int":
|
||||
c.Type = field.TypeInt
|
||||
case "double":
|
||||
c.Type = field.TypeFloat64
|
||||
case "timestamp":
|
||||
c.Type = field.TypeTime
|
||||
case "tinyint":
|
||||
|
||||
Reference in New Issue
Block a user