go-gorm / sharding

High performance table sharding plugin for Gorm.
MIT License
272 stars 59 forks source link

fix: auto migrate error ErrMissingShardingKey #28

Closed a631807682 closed 2 years ago

a631807682 commented 2 years ago

What did this pull request do?

When DoubleWrite is enabled, we need to query database schema information by table name during the migration. In this case, we should use the original ConnPool. https://github.com/go-gorm/postgres/blob/master/migrator.go#L218

User Case Description