From 5eec8a284cbeb6d7938877b547e9bcaf387175d8 Mon Sep 17 00:00:00 2001 From: totegamma Date: Mon, 14 Oct 2024 16:44:22 +0900 Subject: [PATCH] add index --- cmd/api/Dockerfile | 2 +- cmd/gateway/Dockerfile | 2 +- core/dbschema.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/api/Dockerfile b/cmd/api/Dockerfile index d2dfb6bf..6c19e489 100644 --- a/cmd/api/Dockerfile +++ b/cmd/api/Dockerfile @@ -7,7 +7,7 @@ COPY ./go.mod ./go.sum ./ RUN go mod download && go mod verify COPY ./ ./ -RUN go install github.com/concrnt/conctl@v0.0.1 +RUN go install github.com/concrnt/conctl@v0.0.3 RUN VERSION=${VERSION:-$(git describe)} \ && BUILD_MACHINE=$(uname -srmo) \ diff --git a/cmd/gateway/Dockerfile b/cmd/gateway/Dockerfile index 855fd8f6..e56f6066 100644 --- a/cmd/gateway/Dockerfile +++ b/cmd/gateway/Dockerfile @@ -7,7 +7,7 @@ COPY ./go.mod ./go.sum ./ RUN go mod download && go mod verify COPY ./ ./ -RUN go install github.com/concrnt/conctl@v0.0.1 +RUN go install github.com/concrnt/conctl@v0.0.3 RUN VERSION=${VERSION:-$(git describe)} \ && BUILD_MACHINE=$(uname -srmo) \ diff --git a/core/dbschema.go b/core/dbschema.go index 0f78cff5..04323484 100644 --- a/core/dbschema.go +++ b/core/dbschema.go @@ -219,8 +219,8 @@ type Job struct { type CommitOwner struct { ID uint `json:"id" gorm:"primaryKey;auto_increment"` - CommitLogID uint `json:"commitLogID" gorm:"index"` - Owner string `json:"owner" gorm:"type:char(42);index"` + CommitLogID uint `json:"commitLogID" gorm:"index;uniqueIndex:idx_commit_owner"` + Owner string `json:"owner" gorm:"type:char(42);index;uniqueIndex:idx_commit_owner"` } type CommitLog struct {