summaryrefslogtreecommitdiffstats
path: root/models/webhook.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-01-06 23:11:23 +0800
committerGitHub <noreply@github.com>2021-01-06 16:11:23 +0100
commit9f73cae6358c9647cf64589eb2ce055f3dd07f38 (patch)
tree8ed003cd1434f46c3fc5d3aa518084eb4bdb30a6 /models/webhook.go
parentd2ee1221cc7f52c8063e764b6515fbe4e83db517 (diff)
downloadgitea-9f73cae6358c9647cf64589eb2ce055f3dd07f38.tar.gz
gitea-9f73cae6358c9647cf64589eb2ce055f3dd07f38.zip
Fix wrong type on hooktask to convert typ from char(16) to varchar(16) (#14148)
* Fix wrong type on hooktask to convert typ from char(16) to varchar(16) * Fix bugs * Improve code * Use different trim function for MSSQL * Fix bug * Removed wrong changed line * Removed wrong changed line * Fix nullable * Fix lint * Ignore sqlite on migration * Fix mssql modify column failure * Move modifyColumn to migrations.go so that other migrate function could use it
Diffstat (limited to 'models/webhook.go')
-rw-r--r--models/webhook.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/webhook.go b/models/webhook.go
index 9f1b6131af..e0a75843db 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -113,7 +113,7 @@ type Webhook struct {
*HookEvent `xorm:"-"`
IsSSL bool `xorm:"is_ssl"`
IsActive bool `xorm:"INDEX"`
- Type HookTaskType `xorm:"char(16) 'type'"`
+ Type HookTaskType `xorm:"VARCHAR(16) 'type'"`
Meta string `xorm:"TEXT"` // store hook-specific attributes
LastStatus HookStatus // Last delivery status
@@ -641,9 +641,9 @@ type HookTask struct {
RepoID int64 `xorm:"INDEX"`
HookID int64
UUID string
- Typ HookTaskType
- URL string `xorm:"TEXT"`
- Signature string `xorm:"TEXT"`
+ Typ HookTaskType `xorm:"VARCHAR(16) index"`
+ URL string `xorm:"TEXT"`
+ Signature string `xorm:"TEXT"`
api.Payloader `xorm:"-"`
PayloadContent string `xorm:"TEXT"`
HTTPMethod string `xorm:"http_method"`