summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/migrations/v139.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/migrations/v139.go b/models/migrations/v139.go
index ffacad0a09..46b14b9869 100644
--- a/models/migrations/v139.go
+++ b/models/migrations/v139.go
@@ -16,6 +16,8 @@ func prependRefsHeadsToIssueRefs(x *xorm.Engine) error {
switch {
case setting.Database.UseMSSQL:
query = "UPDATE `issue` SET `ref` = 'refs/heads/' + `ref` WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%'"
+ case setting.Database.UseMySQL:
+ query = "UPDATE `issue` SET `ref` = CONCAT('refs/heads/', `ref`) WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%';"
default:
query = "UPDATE `issue` SET `ref` = 'refs/heads/' || `ref` WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%'"
}