mirror of
https://github.com/ent/ent.git
synced 2026-05-01 15:10:57 +03:00
dialect/sql/schema: add optional schema-type to column spec (#461)
This commit is contained in:
@@ -89,6 +89,9 @@ func (d *SQLite) tBuilder(t *Table) *sql.TableBuilder {
|
||||
|
||||
// cType returns the SQLite string type for the given column.
|
||||
func (*SQLite) cType(c *Column) (t string) {
|
||||
if c.SchemaType != nil && c.SchemaType[dialect.SQLite] != "" {
|
||||
return c.SchemaType[dialect.SQLite]
|
||||
}
|
||||
switch c.Type {
|
||||
case field.TypeBool:
|
||||
t = "bool"
|
||||
|
||||
Reference in New Issue
Block a user