Skip to content

Commit

Permalink
Merge pull request #17 from micro-in-cn/fix
Browse files Browse the repository at this point in the history
fix Specified key was too long
  • Loading branch information
Allenxuxu authored Mar 31, 2020
2 parents cd882ca + be2b838 commit a39d4fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config-srv/model/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ type Model struct {

type App struct {
Model
AppName string `gorm:"column:app_name; not null; unique_index:app_uindex; size:500" json:"appName"`
AppName string `gorm:"column:app_name; not null; unique_index:app_uindex; size:100" json:"appName"`
Description string `gorm:"column:description; size:500" json:"description"`
}

type Cluster struct {
Model
AppName string `gorm:"column:app_name; not null; unique_index:cluster_uindex; size:500" json:"appName"`
AppName string `gorm:"column:app_name; not null; unique_index:cluster_uindex; size:100" json:"appName"`
ClusterName string `gorm:"column:cluster_name; not null; unique_index:cluster_uindex; size:100" json:"clusterName"`
Description string `gorm:"column:description; size:500" json:"description"`
}

type Namespace struct {
Model
AppName string `gorm:"column:app_name; not null; unique_index:namespace_uindex; size:500" json:"appName"`
AppName string `gorm:"column:app_name; not null; unique_index:namespace_uindex; size:100" json:"appName"`
ClusterName string `gorm:"column:cluster_name; not null; unique_index:namespace_uindex; size:100" json:"clusterName"`
NamespaceName string `gorm:"column:namespace_name; not null; unique_index:namespace_uindex; size:100" json:"namespaceName"`
Format string `gorm:"column:format" json:"format"`
Expand All @@ -36,7 +36,7 @@ type Namespace struct {

type Release struct {
Model
AppName string `gorm:"column:app_name; not null; unique_index:release_uindex; size:500" json:"appName"`
AppName string `gorm:"column:app_name; not null; unique_index:release_uindex; size:100" json:"appName"`
ClusterName string `gorm:"column:cluster_name; not null; unique_index:release_uindex; size:100" json:"clusterName"`
NamespaceName string `gorm:"column:namespace_name; not null; unique_index:release_uindex; size:100" json:"namespaceName"`
Tag string `gorm:"column:tag; not null; unique_index:release_uindex; size:100" json:"tag"`
Expand Down

0 comments on commit a39d4fb

Please sign in to comment.