fix(settings): use varchar for tenant_id to support global settings
UUID type cannot accept empty string default. Global settings use empty tenant_id, so varchar(36) is the correct type.
This commit is contained in:
parent
0eb6a96057
commit
1f4e2ca0d0
@ -4,7 +4,7 @@ import "time"
|
|||||||
|
|
||||||
type Setting struct {
|
type Setting struct {
|
||||||
ID uint `json:"id" gorm:"primaryKey"`
|
ID uint `json:"id" gorm:"primaryKey"`
|
||||||
TenantID string `json:"tenant_id" gorm:"type:uuid;index:idx_tenant_key,unique;default:''"`
|
TenantID string `json:"tenant_id" gorm:"size:36;index:idx_tenant_key,unique;default:''"`
|
||||||
Key string `json:"key" gorm:"size:128;not null;index:idx_tenant_key,unique"`
|
Key string `json:"key" gorm:"size:128;not null;index:idx_tenant_key,unique"`
|
||||||
Value string `json:"value" gorm:"type:text"`
|
Value string `json:"value" gorm:"type:text"`
|
||||||
Type string `json:"type" gorm:"size:16;default:string"`
|
Type string `json:"type" gorm:"size:16;default:string"`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user