feat: add ip to uk_scheduler index and uk_seed_peer index in manager (#2426)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2023-06-02 17:10:36 +08:00
parent e6049d2362
commit 7546bfc945
No known key found for this signature in database
GPG Key ID: 8B4E5D1290FA2FFB
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ type Scheduler struct {
Hostname string `gorm:"column:host_name;type:varchar(256);index:uk_scheduler,unique;not null;comment:hostname" json:"host_name"`
IDC string `gorm:"column:idc;type:varchar(1024);comment:internet data center" json:"idc"`
Location string `gorm:"column:location;type:varchar(1024);comment:location" json:"location"`
IP string `gorm:"column:ip;type:varchar(256);not null;comment:ip address" json:"ip"`
IP string `gorm:"column:ip;type:varchar(256);index:uk_scheduler,unique;not null;comment:ip address" json:"ip"`
Port int32 `gorm:"column:port;not null;comment:grpc service listening port" json:"port"`
State string `gorm:"column:state;type:varchar(256);default:'inactive';comment:service state" json:"state"`
Features Array `gorm:"column:features;comment:feature flags" json:"features"`

View File

@ -30,7 +30,7 @@ type SeedPeer struct {
Type string `gorm:"column:type;type:varchar(256);comment:type" json:"type"`
IDC string `gorm:"column:idc;type:varchar(1024);comment:internet data center" json:"idc"`
Location string `gorm:"column:location;type:varchar(1024);comment:location" json:"location"`
IP string `gorm:"column:ip;type:varchar(256);not null;comment:ip address" json:"ip"`
IP string `gorm:"column:ip;type:varchar(256);index:uk_seed_peer,unique;not null;comment:ip address" json:"ip"`
Port int32 `gorm:"column:port;not null;comment:grpc service listening port" json:"port"`
DownloadPort int32 `gorm:"column:download_port;not null;comment:download service listening port" json:"download_port"`
ObjectStoragePort int32 `gorm:"column:object_storage_port;comment:object storage service listening port" json:"object_storage_port"`