keon94 opened a new issue, #5689: URL: https://github.com/apache/incubator-devlake/issues/5689
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened This [function](https://github.com/apache/incubator-devlake/blob/7f3200276bb8ba17a9b85564673fe87745b51c1b/backend/server/services/remote/plugin/plugin_impl.go#L233) runs auto-migrations on all the main remote models on every startup. This relies on Gorm to be able to always correctly figure out the diffs. This is not always reliable, and we should prefer writing manual migrations so we can track the diffs explicitly and incrementally. We recently saw errors like this which were confusing:  ### What do you expect to happen Models should be able to migrate predictably and correctly. ### How to reproduce v0.17->v0.18 upgrade on Postgres caused this. Rebooting the server a few times mitigated the problem. ### Anything else _No response_ ### Version main ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
