dialect/sql/schema: add support for pg arrays in migration

This commit is contained in:
Ariel Mashraki
2021-04-13 22:15:40 +03:00
committed by Ariel Mashraki
parent eff6552989
commit fd1f2df150
24 changed files with 585 additions and 23 deletions

View File

@@ -328,3 +328,9 @@ func (d *SQLite) tables() sql.Querier {
From(sql.Table("sqlite_schema")).
Where(sql.EQ("type", "table"))
}
// needsConversion reports if column "old" needs to be converted
// (by table altering) to column "new".
func (d *SQLite) needsConversion(old, new *Column) bool {
return d.cType(old) != d.cType(new)
}