Browse Source

Adding index to parent_id column on issue table

Alan Hardman 5 years ago
parent
commit
13761435ed
2 changed files with 14 additions and 6 deletions
  1. 7 0
      db/14.12.29.sql
  2. 7 6
      db/database.sql

+ 7 - 0
db/14.12.29.sql

@@ -0,0 +1,7 @@
+# This database update occured after commit a2a868d3
+
+# Adding index to parent_id column
+ALTER TABLE `issue` ADD  INDEX `parent_id` (`parent_id`);
+
+# Update Version
+UPDATE `config` SET `value` = '14.12.29' WHERE `attribute` = 'version';

+ 7 - 6
db/database.sql

@@ -61,7 +61,8 @@ CREATE TABLE `issue` (
 	KEY `sprint_id` (`sprint_id`),
 	KEY `repeat_cycle` (`repeat_cycle`),
 	KEY `due_date` (`due_date`),
-	KEY `type_id` (`type_id`)
+	KEY `type_id` (`type_id`),
+	KEY `parent_id` (`parent_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 DROP TABLE IF EXISTS `issue_checklist`;
@@ -266,10 +267,10 @@ CREATE TABLE `session` (
 
 DROP TABLE IF EXISTS `config`;
 CREATE TABLE `config` (
-  `id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-  `attribute` varchar(255) COLLATE 'utf8_general_ci' NULL,
-  `value` varchar(255) COLLATE 'utf8_general_ci' NULL,
-  UNIQUE KEY `attribute` (`attribute`)
+	`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+	`attribute` varchar(255) COLLATE 'utf8_general_ci' NULL,
+	`value` varchar(255) COLLATE 'utf8_general_ci' NULL,
+	UNIQUE KEY `attribute` (`attribute`)
 ) ;
 
-INSERT INTO `config` (`attribute`, `value`) VALUES ('version', '14.12.21');
+INSERT INTO `config` (`attribute`, `value`) VALUES ('version', '14.12.29');