mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 15:06:37 +08:00
fix: 解决不同 mysql 应用无法同名的问题 (#2252)
This commit is contained in:
parent
eff3e8fcc5
commit
9aaf3bf435
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ func (u *MysqlService) Create(ctx context.Context, req dto.MysqlDBCreate) (*mode
|
||||||
return nil, buserr.New(constant.ErrCmdIllegal)
|
return nil, buserr.New(constant.ErrCmdIllegal)
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql, _ := mysqlRepo.Get(commonRepo.WithByName(req.Name), databaseRepo.WithByFrom(req.From))
|
mysql, _ := mysqlRepo.Get(commonRepo.WithByName(req.Name), mysqlRepo.WithByMysqlName(req.Database), databaseRepo.WithByFrom(req.From))
|
||||||
if mysql.ID != 0 {
|
if mysql.ID != 0 {
|
||||||
return nil, constant.ErrRecordExist
|
return nil, constant.ErrRecordExist
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue