Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,9 @@ func fullConfigToDialector(fullConfig contracts.FullConfig) gorm.Dialector {

return postgres.New(postgres.Config{
DSN: dsn,
// When running a migration to add or remove columns, the driver will panic with cached plan must not change result type.
// So PreferSimpleProtocol should be set to true to avoid this issue. The performance will be reduced a little bit,
// but it's worth it to provide full migration support.
PreferSimpleProtocol: true,
})
}
Loading