GORM Playground Link

Description

We have multiple DB's in a MySQL instance, each of these DB's have multiple tables. When we try to upgrade the DB's in parallel using migrator (one per DB). We get errors from MySQL retrying it makes it succeed.

We get the following error while creating foreign keys, these already exist according to the error. Error 1022: Can't write; duplicate key in table '#sql-xxxxxxxxx' Sometimes existing tables are being recreated and that throws the following error Error 1050: Table 'yyyyyyyy' already exists Sometimes it is duplicate column names Error 1060: Duplicate column name 'zzzzzz' Sometimes it is a duplicate index Error 1061: Duplicate key name 'idx_aaaaaaaaaaaa'

Retry the migrate a few times, and error resolves itself. The errors are coming from MySQL.

Thanks for any help. -Krishna

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: saeidee

Please try to reproduce the error with a playground PR https://github.com/go-gorm/playground.

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking