16.09.12.sql 516 B

12345678910111213141516
  1. # Update issue_backlog table structure
  2. ALTER TABLE issue_backlog
  3. ADD COLUMN type_id INT(10) UNSIGNED NULL AFTER user_id;
  4. UPDATE issue_backlog b
  5. JOIN config c ON c.attribute = 'issue_type.project'
  6. SET b.type_id = c.value;
  7. ALTER TABLE issue_backlog
  8. CHANGE type_id type_id INT(10) UNSIGNED NOT NULL,
  9. ADD CONSTRAINT issue_backlog_type_id FOREIGN KEY (type_id)
  10. REFERENCES issue_type(id) ON UPDATE CASCADE ON DELETE CASCADE;
  11. # Update version
  12. UPDATE `config` SET `value` = '16.09.12' WHERE `attribute` = 'version';