From be2b8385bfb087a1179d498cb200b6264166aaa5 Mon Sep 17 00:00:00 2001 From: Allenxuxu <120582243@qq.com> Date: Tue, 31 Mar 2020 16:55:39 +0800 Subject: [PATCH] fix Specified key was too long --- config-srv/model/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config-srv/model/config.go b/config-srv/model/config.go index dbf8907..2aef2f5 100644 --- a/config-srv/model/config.go +++ b/config-srv/model/config.go @@ -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"` @@ -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"`