|
| 1 | +-- Database schema |
| 2 | +-- Do NOT drop anything here |
| 3 | + |
| 4 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_answers` ( |
| 5 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 6 | + `plugin_formcreator_formanswers_id` int(11) NOT NULL DEFAULT '0', |
| 7 | + `plugin_formcreator_questions_id` int(11) NOT NULL DEFAULT '0', |
| 8 | + `answer` longtext, |
| 9 | + PRIMARY KEY (`id`), |
| 10 | + INDEX `plugin_formcreator_formanswers_id` (`plugin_formcreator_formanswers_id`), |
| 11 | + INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`) |
| 12 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 13 | + |
| 14 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_categories` ( |
| 15 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 16 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 17 | + `comment` text, |
| 18 | + `completename` varchar(255) DEFAULT NULL, |
| 19 | + `plugin_formcreator_categories_id` int(11) NOT NULL DEFAULT '0', |
| 20 | + `level` int(11) NOT NULL DEFAULT '1', |
| 21 | + `sons_cache` longtext, |
| 22 | + `ancestors_cache` longtext, |
| 23 | + `knowbaseitemcategories_id` int(11) NOT NULL DEFAULT '0', |
| 24 | + PRIMARY KEY (`id`), |
| 25 | + INDEX `name` (`name`), |
| 26 | + INDEX `knowbaseitemcategories_id` (`knowbaseitemcategories_id`), |
| 27 | + INDEX `plugin_formcreator_categories_id` (`plugin_formcreator_categories_id`) |
| 28 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 29 | + |
| 30 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_entityconfigs` ( |
| 31 | + `id` int(11) NOT NULL, |
| 32 | + `replace_helpdesk` int(11) NOT NULL DEFAULT '0', |
| 33 | + PRIMARY KEY (`id`) |
| 34 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 35 | + |
| 36 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms` ( |
| 37 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 38 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 39 | + `entities_id` int(11) NOT NULL DEFAULT '0', |
| 40 | + `is_recursive` tinyint(1) NOT NULL DEFAULT '0', |
| 41 | + `icon` varchar(255) NOT NULL DEFAULT '', |
| 42 | + `icon_color` varchar(255) NOT NULL DEFAULT '', |
| 43 | + `background_color` varchar(255) NOT NULL DEFAULT '', |
| 44 | + `access_rights` tinyint(1) NOT NULL DEFAULT '1', |
| 45 | + `requesttype` int(11) NOT NULL DEFAULT '0', |
| 46 | + `description` varchar(255) DEFAULT NULL, |
| 47 | + `content` longtext, |
| 48 | + `plugin_formcreator_categories_id` int(11) unsigned NOT NULL DEFAULT '0', |
| 49 | + `is_active` tinyint(1) NOT NULL DEFAULT '0', |
| 50 | + `language` varchar(5) NOT NULL, |
| 51 | + `helpdesk_home` tinyint(1) NOT NULL DEFAULT '0', |
| 52 | + `is_deleted` tinyint(1) NOT NULL DEFAULT '0', |
| 53 | + `validation_required` tinyint(1) NOT NULL DEFAULT '0', |
| 54 | + `usage_count` int(11) NOT NULL DEFAULT '0', |
| 55 | + `is_default` tinyint(1) NOT NULL DEFAULT '0', |
| 56 | + `show_rule` INT(11) NOT NULL DEFAULT '1' COMMENT 'Conditions setting to show the submit button', |
| 57 | + `uuid` varchar(255) DEFAULT NULL, |
| 58 | + PRIMARY KEY (`id`), |
| 59 | + INDEX `entities_id` (`entities_id`), |
| 60 | + INDEX `plugin_formcreator_categories_id` (`plugin_formcreator_categories_id`), |
| 61 | + FULLTEXT KEY `Search` (`name`,`description`) |
| 62 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 63 | + |
| 64 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_formanswers` ( |
| 65 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 66 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 67 | + `entities_id` int(11) NOT NULL DEFAULT '0', |
| 68 | + `is_recursive` tinyint(1) NOT NULL DEFAULT '0', |
| 69 | + `plugin_formcreator_forms_id` int(11) NOT NULL, |
| 70 | + `requester_id` int(11) DEFAULT NULL, |
| 71 | + `users_id_validator` int(11) NOT NULL DEFAULT '0', |
| 72 | + `groups_id_validator` int(11) NOT NULL DEFAULT '0', |
| 73 | + `request_date` datetime NOT NULL, |
| 74 | + `status` int(11) NOT NULL DEFAULT '101', |
| 75 | + `comment` text, |
| 76 | + PRIMARY KEY (`id`), |
| 77 | + INDEX `plugin_formcreator_forms_id` (`plugin_formcreator_forms_id`), |
| 78 | + INDEX `entities_id_is_recursive` (`entities_id`, `is_recursive`), |
| 79 | + INDEX `requester_id` (`requester_id`), |
| 80 | + INDEX `users_id_validator` (`users_id_validator`), |
| 81 | + INDEX `groups_id_validator` (`groups_id_validator`) |
| 82 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 83 | + |
| 84 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms_profiles` ( |
| 85 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 86 | + `plugin_formcreator_forms_id` int(11) NOT NULL, |
| 87 | + `profiles_id` int(11) NOT NULL, |
| 88 | + `uuid` varchar(255) DEFAULT NULL, |
| 89 | + PRIMARY KEY (`id`), |
| 90 | + UNIQUE KEY `unicity` (`plugin_formcreator_forms_id`,`profiles_id`) |
| 91 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 92 | + |
| 93 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms_validators` ( |
| 94 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 95 | + `plugin_formcreator_forms_id` int(11) NOT NULL, |
| 96 | + `itemtype` varchar(255) NOT NULL DEFAULT '', |
| 97 | + `items_id` int(11) NOT NULL, |
| 98 | + `uuid` varchar(255) DEFAULT NULL, |
| 99 | + PRIMARY KEY (`id`), |
| 100 | + UNIQUE KEY `unicity` (`plugin_formcreator_forms_id`,`itemtype`,`items_id`) |
| 101 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 102 | + |
| 103 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questions` ( |
| 104 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 105 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 106 | + `plugin_formcreator_sections_id` int(11) NOT NULL, |
| 107 | + `fieldtype` varchar(30) NOT NULL DEFAULT 'text', |
| 108 | + `required` tinyint(1) NOT NULL DEFAULT '0', |
| 109 | + `show_empty` tinyint(1) NOT NULL DEFAULT '0', |
| 110 | + `default_values` text, |
| 111 | + `values` text, |
| 112 | + `description` text NOT NULL, |
| 113 | + `order` int(11) NOT NULL DEFAULT '0', |
| 114 | + `show_rule` int(11) NOT NULL DEFAULT '1', |
| 115 | + `uuid` varchar(255) DEFAULT NULL, |
| 116 | + PRIMARY KEY (`id`), |
| 117 | + INDEX `plugin_formcreator_sections_id` (`plugin_formcreator_sections_id`), |
| 118 | + FULLTEXT KEY `Search` (`name`,`description`) |
| 119 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 120 | + |
| 121 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_conditions` ( |
| 122 | + `id` INT(11) NOT NULL AUTO_INCREMENT, |
| 123 | + `itemtype` varchar(255) NOT NULL DEFAULT '' COMMENT 'itemtype of the item affected by the condition', |
| 124 | + `items_id` INT(11) NOT NULL DEFAULT '0' COMMENT 'item ID of the item affected by the condition', |
| 125 | + `plugin_formcreator_questions_id` INT(11) NOT NULL DEFAULT '0' COMMENT 'question to test for the condition', |
| 126 | + `show_condition` INT(11) NOT NULL DEFAULT '0', |
| 127 | + `show_value` VARCHAR(255) NULL DEFAULT NULL, |
| 128 | + `show_logic` INT(11) NOT NULL DEFAULT '1', |
| 129 | + `order` INT(11) NOT NULL DEFAULT '1', |
| 130 | + `uuid` VARCHAR(255) NULL DEFAULT NULL, |
| 131 | + PRIMARY KEY (`id`), |
| 132 | + INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`), |
| 133 | + INDEX `item` (`itemtype`, `items_id`) |
| 134 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 135 | + |
| 136 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_sections` ( |
| 137 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 138 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 139 | + `plugin_formcreator_forms_id` int(11) NOT NULL, |
| 140 | + `order` int(11) NOT NULL DEFAULT '0', |
| 141 | + `show_rule` int(11) NOT NULL DEFAULT '1', |
| 142 | + `uuid` varchar(255) DEFAULT NULL, |
| 143 | + PRIMARY KEY (`id`), |
| 144 | + INDEX `plugin_formcreator_forms_id` (`plugin_formcreator_forms_id`) |
| 145 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 146 | + |
| 147 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targetchanges` ( |
| 148 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 149 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 150 | + `plugin_formcreator_forms_id` int(11) NOT NULL DEFAULT '0', |
| 151 | + `target_name` varchar(255) NOT NULL DEFAULT '', |
| 152 | + `content` longtext, |
| 153 | + `impactcontent` longtext, |
| 154 | + `controlistcontent` longtext, |
| 155 | + `rolloutplancontent` longtext, |
| 156 | + `backoutplancontent` longtext, |
| 157 | + `checklistcontent` longtext, |
| 158 | + `due_date_rule` int(11) NOT NULL DEFAULT '1', |
| 159 | + `due_date_question` int(11) DEFAULT NULL, |
| 160 | + `due_date_value` tinyint(4) DEFAULT NULL, |
| 161 | + `due_date_period` int(11) NOT NULL DEFAULT '0', |
| 162 | + `urgency_rule` int(11) NOT NULL DEFAULT '1', |
| 163 | + `urgency_question` int(11) NOT NULL DEFAULT '0', |
| 164 | + `validation_followup` tinyint(1) NOT NULL DEFAULT '1', |
| 165 | + `destination_entity` int(11) NOT NULL DEFAULT '1', |
| 166 | + `destination_entity_value` int(11) DEFAULT NULL, |
| 167 | + `tag_type` int(11) NOT NULL DEFAULT '1', |
| 168 | + `tag_questions` varchar(255) NOT NULL, |
| 169 | + `tag_specifics` varchar(255) NOT NULL, |
| 170 | + `category_rule` int(11) NOT NULL DEFAULT '1', |
| 171 | + `category_question` int(11) NOT NULL DEFAULT '0', |
| 172 | + `show_rule` int(11) NOT NULL DEFAULT '1', |
| 173 | + `uuid` varchar(255) DEFAULT NULL, |
| 174 | + PRIMARY KEY (`id`) |
| 175 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 176 | + |
| 177 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targetchanges_actors` ( |
| 178 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 179 | + `plugin_formcreator_targetchanges_id` int(11) NOT NULL, |
| 180 | + `actor_role` int(11) NOT NULL DEFAULT '1', |
| 181 | + `actor_type` int(11) NOT NULL DEFAULT '1', |
| 182 | + `actor_value` int(11) DEFAULT NULL, |
| 183 | + `use_notification` tinyint(1) NOT NULL DEFAULT '1', |
| 184 | + `uuid` varchar(255) DEFAULT NULL, |
| 185 | + PRIMARY KEY (`id`), |
| 186 | + INDEX `plugin_formcreator_targetchanges_id` (`plugin_formcreator_targetchanges_id`) |
| 187 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 188 | + |
| 189 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targettickets` ( |
| 190 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 191 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 192 | + `plugin_formcreator_forms_id` int(11) NOT NULL DEFAULT '0', |
| 193 | + `target_name` varchar(255) NOT NULL DEFAULT '', |
| 194 | + `type_rule` int(11) NOT NULL DEFAULT '1', |
| 195 | + `type_question` int(11) NOT NULL DEFAULT '0', |
| 196 | + `tickettemplates_id` int(11) DEFAULT NULL, |
| 197 | + `content` longtext, |
| 198 | + `due_date_rule` int(11) NOT NULL DEFAULT '1', |
| 199 | + `due_date_question` int(11) DEFAULT NULL, |
| 200 | + `due_date_value` tinyint(4) DEFAULT NULL, |
| 201 | + `due_date_period` int(11) NOT NULL DEFAULT '0', |
| 202 | + `urgency_rule` int(11) NOT NULL DEFAULT '1', |
| 203 | + `urgency_question` int(11) NOT NULL DEFAULT '0', |
| 204 | + `validation_followup` tinyint(1) NOT NULL DEFAULT '1', |
| 205 | + `destination_entity` int(11) NOT NULL DEFAULT '1', |
| 206 | + `destination_entity_value` int(11) DEFAULT NULL, |
| 207 | + `tag_type` int(11) NOT NULL DEFAULT '1', |
| 208 | + `tag_questions` varchar(255) NOT NULL, |
| 209 | + `tag_specifics` varchar(255) NOT NULL, |
| 210 | + `category_rule` int(11) NOT NULL DEFAULT '1', |
| 211 | + `category_question` int(11) NOT NULL DEFAULT '0', |
| 212 | + `associate_rule` int(11) NOT NULL DEFAULT '1', |
| 213 | + `associate_question` int(11) NOT NULL DEFAULT '0', |
| 214 | + `uuid` varchar(255) DEFAULT NULL, |
| 215 | + `location_rule` INT(11) NOT NULL DEFAULT '1', |
| 216 | + `location_question` int(11) NOT NULL DEFAULT '0', |
| 217 | + `show_rule` int(11) NOT NULL DEFAULT '1', |
| 218 | + PRIMARY KEY (`id`), |
| 219 | + INDEX `tickettemplates_id` (`tickettemplates_id`) |
| 220 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 221 | + |
| 222 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targettickets_actors` ( |
| 223 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 224 | + `plugin_formcreator_targettickets_id` int(11) NOT NULL, |
| 225 | + `actor_role` int(11) NOT NULL DEFAULT '1', |
| 226 | + `actor_type` int(11) NOT NULL DEFAULT '1', |
| 227 | + `actor_value` int(11) DEFAULT NULL, |
| 228 | + `use_notification` tinyint(1) NOT NULL DEFAULT '1', |
| 229 | + `uuid` varchar(255) DEFAULT NULL, |
| 230 | + PRIMARY KEY (`id`), |
| 231 | + INDEX `plugin_formcreator_targettickets_id` (`plugin_formcreator_targettickets_id`) |
| 232 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 233 | + |
| 234 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_issues` ( |
| 235 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 236 | + `name` varchar(255) NOT NULL DEFAULT '', |
| 237 | + `display_id` varchar(255) NOT NULL, |
| 238 | + `original_id` int(11) NOT NULL DEFAULT '0', |
| 239 | + `sub_itemtype` varchar(100) NOT NULL DEFAULT '', |
| 240 | + `status` varchar(255) NOT NULL DEFAULT '', |
| 241 | + `date_creation` datetime NOT NULL, |
| 242 | + `date_mod` datetime NOT NULL, |
| 243 | + `entities_id` int(11) NOT NULL DEFAULT '0', |
| 244 | + `is_recursive` tinyint(1) NOT NULL DEFAULT '0', |
| 245 | + `requester_id` int(11) NOT NULL DEFAULT '0', |
| 246 | + `users_id_validator` int(11) NOT NULL DEFAULT '0', |
| 247 | + `groups_id_validator` int(11) NOT NULL DEFAULT '0', |
| 248 | + `comment` longtext, |
| 249 | + PRIMARY KEY (`id`), |
| 250 | + INDEX `original_id_sub_itemtype` (`original_id`, `sub_itemtype`), |
| 251 | + INDEX `entities_id` (`entities_id`), |
| 252 | + INDEX `requester_id` (`requester_id`), |
| 253 | + INDEX `users_id_validator` (`users_id_validator`), |
| 254 | + INDEX `groups_id_validator` (`groups_id_validator`) |
| 255 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 256 | + |
| 257 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_items_targettickets` ( |
| 258 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 259 | + `plugin_formcreator_targettickets_id` int(11) NOT NULL DEFAULT '0', |
| 260 | + `link` int(11) NOT NULL DEFAULT '0', |
| 261 | + `itemtype` varchar(255) NOT NULL DEFAULT '', |
| 262 | + `items_id` int(11) NOT NULL DEFAULT '0', |
| 263 | + `uuid` varchar(255) DEFAULT NULL, |
| 264 | + PRIMARY KEY (`id`), |
| 265 | + INDEX `plugin_formcreator_targettickets_id` (`plugin_formcreator_targettickets_id`), |
| 266 | + INDEX `item` (`itemtype`,`items_id`) |
| 267 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 268 | + |
| 269 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questiondependencies` ( |
| 270 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 271 | + `plugin_formcreator_questions_id` int(11) NOT NULL, |
| 272 | + `plugin_formcreator_questions_id_2` int(11) NOT NULL, |
| 273 | + `fieldname` varchar(255) DEFAULT NULL, |
| 274 | + `uuid` varchar(255) DEFAULT NULL, |
| 275 | + PRIMARY KEY (`id`), |
| 276 | + INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`), |
| 277 | + INDEX `plugin_formcreator_questions_id_2` (`plugin_formcreator_questions_id_2`) |
| 278 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 279 | + |
| 280 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionregexes` ( |
| 281 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 282 | + `plugin_formcreator_questions_id` int(11) NOT NULL, |
| 283 | + `regex` text DEFAULT NULL, |
| 284 | + `fieldname` varchar(255) DEFAULT NULL, |
| 285 | + `uuid` varchar(255) DEFAULT NULL, |
| 286 | + PRIMARY KEY (`id`), |
| 287 | + INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`) |
| 288 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 289 | + |
| 290 | +CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionranges` ( |
| 291 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 292 | + `plugin_formcreator_questions_id` int(11) NOT NULL, |
| 293 | + `range_min` varchar(255) DEFAULT NULL, |
| 294 | + `range_max` varchar(255) DEFAULT NULL, |
| 295 | + `fieldname` varchar(255) DEFAULT NULL, |
| 296 | + `uuid` varchar(255) DEFAULT NULL, |
| 297 | + PRIMARY KEY (`id`), |
| 298 | + INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`) |
| 299 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
0 commit comments