You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "CamilleTeruel (via GitHub)" <gi...@apache.org> on 2023/07/20 16:03:16 UTC
[GitHub] [incubator-devlake] CamilleTeruel commented on a diff in pull request #5714: [fix-5697][Pydevlake]: Fix AddColumn op possibly deleting a column
CamilleTeruel commented on code in PR #5714:
URL: https://github.com/apache/incubator-devlake/pull/5714#discussion_r1269677308
##########
backend/server/services/remote/plugin/plugin_impl.go:
##########
@@ -231,28 +231,35 @@ func (p *remotePluginImpl) ApiResources() map[string]map[string]plugin.ApiResour
}
func (p *remotePluginImpl) RunAutoMigrations() errors.Error {
- db := basicRes.GetDal()
- err := api.CallDB(db.AutoMigrate, p.connectionTabler.New())
+ err := p.createTable(p.connectionTabler.New())
if err != nil {
return err
}
- err = api.CallDB(db.AutoMigrate, p.scopeTabler.New())
+ err = p.createTable(p.scopeTabler.New())
if err != nil {
return err
}
- err = api.CallDB(db.AutoMigrate, p.scopeConfigTabler.New())
+ err = p.createTable(p.scopeConfigTabler.New())
if err != nil {
return err
}
for _, toolModelTabler := range p.toolModelTablers {
- err = api.CallDB(db.AutoMigrate, toolModelTabler.New())
+ err = p.createTable(toolModelTabler.New())
if err != nil {
return err
}
}
return nil
}
+func (p *remotePluginImpl) createTable(tbl coreModels.DynamicTabler) errors.Error {
Review Comment:
This change disables all automigrations but table creation, and I thought we settled on adding a CreateTable op instead?
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org