use text for string storage in db (#173)
This commit is contained in:
parent
61578d4a9d
commit
c89623abd0
|
|
@ -23,12 +23,12 @@ type Application struct {
|
|||
//
|
||||
// required: true
|
||||
// example: Backup Server
|
||||
Name string `form:"name" query:"name" json:"name" binding:"required"`
|
||||
Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"`
|
||||
// The description of the application.
|
||||
//
|
||||
// required: true
|
||||
// example: Backup server for the interwebs
|
||||
Description string `form:"description" query:"description" json:"description"`
|
||||
Description string `gorm:"type:text" form:"description" query:"description" json:"description"`
|
||||
// Whether the application is an internal application. Internal applications should not be deleted.
|
||||
//
|
||||
// read only: true
|
||||
|
|
@ -40,6 +40,6 @@ type Application struct {
|
|||
// read only: true
|
||||
// required: true
|
||||
// example: image/image.jpeg
|
||||
Image string `json:"image"`
|
||||
Image string `gorm:"type:text" json:"image"`
|
||||
Messages []MessageExternal `json:"-"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@ type Client struct {
|
|||
//
|
||||
// required: true
|
||||
// example: Android Phone
|
||||
Name string `form:"name" query:"name" json:"name" binding:"required"`
|
||||
Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
type Message struct {
|
||||
ID uint `gorm:"AUTO_INCREMENT;primary_key;index"`
|
||||
ApplicationID uint
|
||||
Message string
|
||||
Title string
|
||||
Message string `gorm:"type:text"`
|
||||
Title string `gorm:"type:text"`
|
||||
Priority int
|
||||
Extras []byte
|
||||
Date time.Time
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package model
|
|||
type PluginConf struct {
|
||||
ID uint `gorm:"primary_key;AUTO_INCREMENT;index"`
|
||||
UserID uint
|
||||
ModulePath string
|
||||
ModulePath string `gorm:"type:text"`
|
||||
Token string `gorm:"unique_index"`
|
||||
ApplicationID uint
|
||||
Enabled bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue