16.12.01.sql 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Update issue table to include due_date_sprint setting
  2. ALTER TABLE `issue`
  3. ADD COLUMN `due_date_sprint` TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL;
  4. ALTER VIEW `issue_detail` AS
  5. SELECT
  6. `issue`.`id` AS `id`,
  7. `issue`.`status` AS `status`,
  8. `issue`.`type_id` AS `type_id`,
  9. `issue`.`name` AS `name`,
  10. `issue`.`description` AS `description`,
  11. `issue`.`parent_id` AS `parent_id`,
  12. `issue`.`author_id` AS `author_id`,
  13. `issue`.`owner_id` AS `owner_id`,
  14. `issue`.`priority` AS `priority`,
  15. `issue`.`hours_total` AS `hours_total`,
  16. `issue`.`hours_remaining` AS `hours_remaining`,
  17. `issue`.`hours_spent` AS `hours_spent`,
  18. `issue`.`created_date` AS `created_date`,
  19. `issue`.`closed_date` AS `closed_date`,
  20. `issue`.`deleted_date` AS `deleted_date`,
  21. `issue`.`start_date` AS `start_date`,
  22. `issue`.`due_date` AS `due_date`,
  23. ISNULL(`issue`.`due_date`) AS `has_due_date`,
  24. `issue`.`repeat_cycle` AS `repeat_cycle`,
  25. `issue`.`sprint_id` AS `sprint_id`,
  26. `issue`.`due_date_sprint` AS `due_date_sprint`,
  27. `sprint`.`name` AS `sprint_name`,
  28. `sprint`.`start_date` AS `sprint_start_date`,
  29. `sprint`.`end_date` AS `sprint_end_date`,
  30. `type`.`name` AS `type_name`,
  31. `status`.`name` AS `status_name`,
  32. `status`.`closed` AS `status_closed`,
  33. `priority`.`id` AS `priority_id`,
  34. `priority`.`name` AS `priority_name`,
  35. `author`.`username` AS `author_username`,
  36. `author`.`name` AS `author_name`,
  37. `author`.`email` AS `author_email`,
  38. `author`.`task_color` AS `author_task_color`,
  39. `owner`.`username` AS `owner_username`,
  40. `owner`.`name` AS `owner_name`,
  41. `owner`.`email` AS `owner_email`,
  42. `owner`.`task_color` AS `owner_task_color`,
  43. `parent`.`name` AS `parent_name`
  44. FROM `issue`
  45. LEFT JOIN `user` `author` ON `issue`.`author_id` = `author`.`id`
  46. LEFT JOIN `user` `owner` ON `issue`.`owner_id` = `owner`.`id`
  47. LEFT JOIN `issue_status` `status` ON `issue`.`status` = `status`.`id`
  48. LEFT JOIN `issue_priority` `priority` ON `issue`.`priority` = `priority`.`value`
  49. LEFT JOIN `issue_type` `type` ON `issue`.`type_id` = `type`.`id`
  50. LEFT JOIN `sprint` ON `issue`.`sprint_id` = `sprint`.`id`
  51. LEFT JOIN `issue` `parent` ON `issue`.`parent_id` = `parent`.`id`;
  52. # Update version
  53. UPDATE `config` SET `value` = '16.12.01' WHERE `attribute` = 'version';