File tree Expand file tree Collapse file tree
server/controller/db/metadb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,5 +20,5 @@ const (
2020 RAW_SQL_ROOT_DIR = "/etc/metadb/schema/rawsql"
2121
2222 DB_VERSION_TABLE = "db_version"
23- DB_VERSION_EXPECTED = "6.6.1.69 "
23+ DB_VERSION_EXPECTED = "6.6.1.70 "
2424)
Original file line number Diff line number Diff line change @@ -1277,7 +1277,7 @@ CREATE TABLE IF NOT EXISTS custom_service (
12771277 id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY ,
12781278 name VARCHAR (128 ) NOT NULL ,
12791279 type INTEGER DEFAULT 0 COMMENT ' 0: unknown 1: IP 2: PORT 3: chost 4: pod_service 5: pod_group 6:pod 7: host' ,
1280- match_type INTEGER DEFAULT 1 COMMENT ' 0: unkonwn 1: name match 2: uid match' ,
1280+ match_type INTEGER DEFAULT 0 COMMENT ' 0: none 1: name match 2: uid match' ,
12811281 epc_ids TEXT COMMENT ' separated by ,' ,
12821282 pod_cluster_ids TEXT COMMENT ' separated by ,' ,
12831283 pod_namespace_ids TEXT COMMENT ' separated by ,' ,
Original file line number Diff line number Diff line change 1+
2+ -- Fix match_type default value and reset it for IP/PORT type custom_services
3+ ALTER TABLE custom_service MODIFY COLUMN match_type INTEGER DEFAULT 0 COMMENT ' 0: none 1: name match 2: uid match' ;
4+
5+ UPDATE custom_service SET match_type = 0 WHERE type IN (1 , 2 );
6+
7+ -- Update DB version
8+ UPDATE db_version SET version= ' 6.6.1.70' ;
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ type CustomService struct {
10901090 OperatedTime `gorm:"embedded" mapstructure:",squash"`
10911091 Name string `gorm:"column:name;type:varchar(128);default:''" json:"NAME" mapstructure:"NAME"`
10921092 Type int `gorm:"column:type;type:int;default:0" json:"TYPE" mapstructure:"TYPE"`
1093- MatchType int `gorm:"column:match_type;type:int;default:1 " json:"MATCH_TYPE" mapstructure:"MATCH_TYPE"`
1093+ MatchType int `gorm:"column:match_type;type:int;default:0 " json:"MATCH_TYPE" mapstructure:"MATCH_TYPE"`
10941094 VPCIDs AutoSplitedInts `gorm:"column:epc_ids;type:text;default:''" json:"EPC_IDS" mapstructure:"EPC_IDS"`
10951095 PodClusterIDs AutoSplitedInts `gorm:"column:pod_cluster_ids;type:text;default:''" json:"POD_CLUSTER_IDS" mapstructure:"POD_CLUSTER_IDS"`
10961096 PodNamespaceIDs AutoSplitedInts `gorm:"column:pod_namespace_ids;type:text;default:''" json:"POD_NAMESPACE_IDS" mapstructure:"POD_NAMESPACE_IDS"`
You can’t perform that action at this time.
0 commit comments