Skip to content

Commit 119909f

Browse files
committed
more
1 parent feac4df commit 119909f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/migrations/op_create_constraint.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,11 @@ func (o *OpCreateConstraint) Complete(ctx context.Context, l Logger, conn db.DB,
150150
}
151151
}
152152

153-
dbActions = append(dbActions,
154-
NewAlterSequenceOwnerAction(conn, o.Table, col, TemporaryName(col)),
155-
NewDropColumnAction(conn, o.Table, o.Columns...),
156-
)
153+
for _, col := range o.Columns {
154+
dbActions = append(dbActions, NewAlterSequenceOwnerAction(conn, o.Table, col, TemporaryName(col)))
155+
}
156+
157+
dbActions = append(dbActions, NewDropColumnAction(conn, o.Table, o.Columns...))
157158

158159
// rename new columns to old name
159160
table := s.GetTable(o.Table)

0 commit comments

Comments
 (0)