Skip to content

Commit 81486d5

Browse files
committed
add constraint
1 parent c1587a5 commit 81486d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mod/services/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
var _ astral.Object = &Service{}
1010

1111
type Service struct {
12-
Name astral.String8 // mod.nat
13-
Identity *astral.Identity // if its module of node then idenity = NodeId, if it's service accessible beacuase of app then identity = AppId
12+
Name astral.String8
13+
Identity *astral.Identity // if its module of node then identity = NodeId, if it's of app service then identity = AppId
1414
Composition *astral.Bundle
1515
}
1616

mod/services/src/db_service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
// dbService represents discovered service of a specific identity cached in the database
88
type dbService struct {
9-
Name astral.String8 `gorm:"index"`
10-
Identity *astral.Identity `gorm:"index"`
9+
Name astral.String8 `gorm:"uniqueIndex:idx_db_service_name_identity"`
10+
Identity *astral.Identity `gorm:"uniqueIndex:idx_db_service_name_identity"`
1111
Composition *astral.Bundle `gorm:"serializer:json"`
1212
CreatedAt astral.Time `gorm:"autoCreateTime"`
1313
}

0 commit comments

Comments
 (0)