Update database/sql/sql.go
Co-authored-by: Mario Constanti <github@constanti.de>
This commit is contained in:
parent
8726cb994e
commit
75eb45c97a
1 changed files with 3 additions and 3 deletions
|
|
@ -337,15 +337,15 @@ func (s *sqlDatabase) migrateCredentialsToDB() (err error) {
|
||||||
return errors.Wrap(err, "creating github credentials")
|
return errors.Wrap(err, "creating github credentials")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.conn.Exec("update repositories set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint, creds.Name).Error; err != nil {
|
if err := s.conn.Exec("update repositories set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint.Name, creds.Name).Error; err != nil {
|
||||||
return errors.Wrap(err, "updating repositories")
|
return errors.Wrap(err, "updating repositories")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.conn.Exec("update organizations set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint, creds.Name).Error; err != nil {
|
if err := s.conn.Exec("update organizations set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint.Name, creds.Name).Error; err != nil {
|
||||||
return errors.Wrap(err, "updating organizations")
|
return errors.Wrap(err, "updating organizations")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.conn.Exec("update enterprises set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint, creds.Name).Error; err != nil {
|
if err := s.conn.Exec("update enterprises set credentials_id = ?,endpoint_name = ? where credentials_name = ?", creds.ID, creds.Endpoint.Name, creds.Name).Error; err != nil {
|
||||||
return errors.Wrap(err, "updating enterprises")
|
return errors.Wrap(err, "updating enterprises")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue