Tabellenstruktur für Tabelle `schedulers` -- CREATE TABLE IF NOT EXISTS `schedulers` ( `id` int(11) NOT NULL, `title` varchar(45) NOT NULL, `switches_id` int(11) NOT NULL, `date_start_on` timestamp NULL DEFAULT NULL, `date_start_off` timestamp NULL DEFAULT NULL, `date_stop` tinyint(1) DEFAULT NULL, `date_stop_on` timestamp NULL DEFAULT NULL, `date_stop_off` timestamp NULL DEFAULT NULL, `duration` varchar(20) DEFAULT NULL, `interval_number` int(11) DEFAULT NULL, `interval_unit` varchar(45) DEFAULT NULL, `weekly_monday` tinyint(1) DEFAULT NULL, `weekly_tuesday` tinyint(1) DEFAULT NULL, `weekly_wednesday` tinyint(1) DEFAULT NULL, `weekly_thursday` tinyint(1) DEFAULT NULL, `weekly_friday` tinyint(1) DEFAULT NULL, `weekly_saturday` tinyint(1) DEFAULT NULL, `weekly_sunday` tinyint(1) DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8; -- -- Daten für Tabelle `schedulers` -- INSERT INTO `schedulers` (`id`, `title`, `switches_id`, `date_start_on`, `date_start_off`, `date_stop`, `date_stop_on`, `date_stop_off`, `duration`, `interval_number`, `interval_unit`, `weekly_monday`, `weekly_tuesday`, `weekly_wednesday`, `weekly_thursday`, `weekly_friday`, `weekly_saturday`, `weekly_sunday`) VALUES (128, 'Einmalig', 1, '2015-10-19 20:28:00', '2015-10-20 02:28:00', 0, NULL, NULL, 'einmalig', 0, NULL, 0, 0, 0, 0, 0, 0, 0), (129, 'Wochentage', 52, '2015-10-03 08:00:00', '2015-10-03 14:00:00', 0, NULL, NULL, 'wochentag', 0, NULL, 1, 1, 0, 0, 1, 0, 0), (130, 'Intervall bis 22.10.', 90, '2015-10-01 04:30:00', '2015-10-01 10:00:00', 1, '2015-10-22 04:30:00', '2015-10-22 10:00:00', 'intervall', 2, 'Tage', 0, 0, 0, 0, 0, 0, 0); -- Tabellenstruktur für Tabelle `switches` -- CREATE TABLE IF NOT EXISTS `switches` ( `id` int(11) NOT NULL, `title` varchar(45) DEFAULT NULL, `description` varchar(45) DEFAULT NULL, `typ` varchar(45) DEFAULT NULL, `argA` varchar(15) DEFAULT NULL, `argB` varchar(15) DEFAULT NULL, `argC` varchar(15) DEFAULT NULL, `argD` varchar(15) DEFAULT NULL, `icon` varchar(20) DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8; -- -- Daten für Tabelle `switches` -- INSERT INTO `switches` (`id`, `title`, `description`, `typ`, `argA`, `argB`, `argC`, `argD`, `icon`) VALUES (1, 'funk_einzel_1', 'Funksteckdose', 'tf_remote', 'c', 'A', '1', NULL, 'transmitter2.png'), (5, 'usb_steckdose_1', 'USB-Steckdosenleiste', 'usb_socket', '0', NULL, NULL, NULL, 'usb2.png'), (6, 'usb_steckdose_2', 'USB-Steckdosenleiste', 'usb_socket', '1', NULL, NULL, NULL, 'usb2.png'), (7, 'usb_steckdose_3', 'USB-Steckdosenleiste', 'usb_socket', '2', NULL, NULL, NULL, 'usb2.png'), (8, 'usb_steckdose_4', 'USB-Steckdosenleiste', 'usb_socket', '3', NULL, NULL, NULL, 'usb2.png'), (52, 'relais A', 'TF Dual Relais', 'tf_dual', 'a', NULL, NULL, NULL, 'relay2.png'), (90, 'gpio 17', 'RasPi GPIO', 'gpio', '11', NULL, NULL, NULL, 'raspi2.png'), (92, 'title', 'description', 'typ', 'argA', 'argB', 'argC', 'argD', 'icon'); -- -- Indizes der exportierten Tabellen -- -- -- Indizes für die Tabelle `schedulers` -- ALTER TABLE `schedulers` ADD PRIMARY KEY (`id`,`switches_id`), ADD UNIQUE KEY `id_UNIQUE` (`id`), ADD UNIQUE KEY `title_UNIQUE` (`title`), ADD KEY `fk_schedulers_switches_idx` (`switches_id`); -- -- Indizes für die Tabelle `switches` -- ALTER TABLE `switches` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT für exportierte Tabellen -- -- -- AUTO_INCREMENT für Tabelle `schedulers` -- ALTER TABLE `schedulers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=131; -- -- AUTO_INCREMENT für Tabelle `switches` -- ALTER TABLE `switches` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=93; -- -- Constraints der exportierten Tabellen -- -- -- Constraints der Tabelle `schedulers` -- ALTER TABLE `schedulers` ADD CONSTRAINT `fk_schedulers_switches` FOREIGN KEY (`switches_id`) REFERENCES `switches` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;