|
|
@ -16,6 +16,8 @@ func prependRefsHeadsToIssueRefs(x *xorm.Engine) error { |
|
|
|
switch { |
|
|
|
switch { |
|
|
|
case setting.Database.UseMSSQL: |
|
|
|
case setting.Database.UseMSSQL: |
|
|
|
query = "UPDATE `issue` SET `ref` = 'refs/heads/' + `ref` WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%'" |
|
|
|
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: |
|
|
|
default: |
|
|
|
query = "UPDATE `issue` SET `ref` = 'refs/heads/' || `ref` WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%'" |
|
|
|
query = "UPDATE `issue` SET `ref` = 'refs/heads/' || `ref` WHERE `ref` IS NOT NULL AND `ref` <> '' AND `ref` NOT LIKE 'refs/%'" |
|
|
|
} |
|
|
|
} |
|
|
|