This is an automated email from the ASF dual-hosted git repository.

robotljw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new e806929  change service col unique index
     new 3313026  Merge pull request #1071 from DFSOrange/unique
e806929 is described below

commit e806929f52560adf7a8bb838b7345a7cea7e7804
Author: panqian <[email protected]>
AuthorDate: Fri Jun 25 15:53:50 2021 +0800

    change service col unique index
---
 datasource/mongo/mongo.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/datasource/mongo/mongo.go b/datasource/mongo/mongo.go
index 6d167da..5356e77 100644
--- a/datasource/mongo/mongo.go
+++ b/datasource/mongo/mongo.go
@@ -165,6 +165,8 @@ func EnsureService() {
        wrapCreateCollectionError(err)
 
        serviceIDIndex := mutil.BuildIndexDoc(
+               model.ColumnDomain,
+               model.ColumnProject,
                mutil.ConnectWithDot([]string{model.ColumnService, 
model.ColumnServiceID}))
        serviceIDIndex.Options = options.Index().SetUnique(true)
 

Reply via email to