Skip to content

Commit

Permalink
fix: append IDENTITY to ADD COLUMN statement if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
bevzzz committed Oct 27, 2024
1 parent b1ae32e commit 694f873
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dialect/pgdialect/alter_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ func (m *migrator) addColumn(fmter schema.Formatter, b []byte, add *migrate.AddC

b, _ = add.ColDef.AppendQuery(fmter, b)

if add.ColDef.IsIdentity {
b = appendGeneratedAsIdentity(b)
}

return b, nil
}

Expand Down

0 comments on commit 694f873

Please sign in to comment.