sql/dialect/schema: support setting PK to serial types in postgres (#2748)

This commit is contained in:
Ariel Mashraki
2022-07-13 14:40:56 +03:00
committed by GitHub
parent dd4a0203e5
commit 1c01301de1
32 changed files with 3674 additions and 11 deletions

View File

@@ -758,6 +758,9 @@ func (d *Postgres) atImplicitIndexName(idx *Index, t1 *Table, c1 *Column) bool {
}
func (d *Postgres) atIncrementC(t *schema.Table, c *schema.Column) {
if _, ok := c.Type.Type.(*postgres.SerialType); ok {
return
}
id := &postgres.Identity{}
for _, a := range t.Attrs {
if a, ok := a.(*postgres.Identity); ok {