mirror of
https://github.com/ent/ent.git
synced 2026-05-01 07:00:57 +03:00
dialect/sql/schema: allow setting JSON default values on pg, sqlite and maria (#3081)
This commit is contained in:
@@ -400,6 +400,11 @@ func (d *SQLite) atTable(t1 *Table, t2 *schema.Table) {
|
||||
}
|
||||
}
|
||||
|
||||
func (d *SQLite) supportsDefault(*Column) bool {
|
||||
// SQLite supports default values for all standard types.
|
||||
return true
|
||||
}
|
||||
|
||||
func (d *SQLite) atTypeC(c1 *Column, c2 *schema.Column) error {
|
||||
if c1.SchemaType != nil && c1.SchemaType[dialect.SQLite] != "" {
|
||||
t, err := sqlite.ParseType(strings.ToLower(c1.SchemaType[dialect.SQLite]))
|
||||
|
||||
Reference in New Issue
Block a user