go-gorm / postgres

GORM PostgreSQL driver
MIT License
234 stars 123 forks source link

Do not attempt to create a new connection in AlterColumn #103 #108

Closed AlessandroSechi closed 2 years ago

AlessandroSechi commented 2 years ago

What did this pull request do?

Prevents migrations breaking while executing them inside a transaction.

User Case Description

Performing migration inside a transaction, which alters a column, doesn't work if new connection is created. Instead, always reuse old one

AlessandroSechi commented 2 years ago

@jinzhu tests passed

jinzhu commented 2 years ago

lgtm, thank you for your contribution