| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 |  
CREATE TABLE IF NOT EXISTS `text_template` (
  `id_text_template` varchar(20) NOT NULL,
  `label` varchar(200) NOT NULL,
  PRIMARY KEY (`id_text_template`)
) ENGINE=InnoDB;
 
 
CREATE TABLE IF NOT EXISTS `text_panel` (
  `id_panel` int(11) NOT NULL,
  `id_text_template` varchar(20) NULL,
  `content` longtext NOT NULL,
  PRIMARY KEY (`id_panel`),
  FOREIGN KEY (`id_panel`) REFERENCES `panel` (`id_panel`) ON DELETE CASCADE,
  FOREIGN KEY (`id_text_template`) REFERENCES `text_template` (`id_text_template`) ON UPDATE CASCADE
) ENGINE=InnoDB;
 
CREATE TABLE IF NOT EXISTS `text_component` (
  `id_text_component` int(1) NOT NULL,
  `id_text_template` varchar(20) NULL,
  `sound` varchar(300) NULL,
  `mute` tinyint(1) NOT NULL,
  PRIMARY KEY (`id_text_component`),
  FOREIGN KEY (`id_text_template`) REFERENCES `text_template` (`id_text_template`) ON UPDATE CASCADE
) ENGINE=InnoDB; | 
Partager