You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

195 lines
6.7 KiB

-- MySQL dump 10.15 Distrib 10.0.28-MariaDB, for debian-linux-gnueabihf (armv7l)
--
-- Host: led Database: led
-- ------------------------------------------------------
-- Server version 10.0.28-MariaDB-2+b1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `board`
--
Use `led`;
DROP TABLE IF EXISTS `board`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `board` (
`PK_board` int(11) NOT NULL AUTO_INCREMENT,
`address` varchar(10) DEFAULT NULL,
PRIMARY KEY (`PK_board`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `board`
--
LOCK TABLES `board` WRITE;
/*!40000 ALTER TABLE `board` DISABLE KEYS */;
INSERT INTO `board` VALUES (1,'0x40');
/*!40000 ALTER TABLE `board` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `light`
--
DROP TABLE IF EXISTS `light`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `light` (
`PK_light` int(11) NOT NULL AUTO_INCREMENT,
`FK_type` int(11) NOT NULL,
`name` varchar(45) NOT NULL,
`description` varchar(255) NOT NULL,
PRIMARY KEY (`PK_light`),
KEY `FK_type` (`FK_type`),
CONSTRAINT `light_ibfk_1` FOREIGN KEY (`FK_type`) REFERENCES `type` (`PK_type`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `light`
--
LOCK TABLES `light` WRITE;
/*!40000 ALTER TABLE `light` DISABLE KEYS */;
INSERT INTO `light` VALUES (1,1,'1. Stripe','Absout erster Stripe'),(2,1,'2. Stripe','Der zweite Stripe');
/*!40000 ALTER TABLE `light` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mapping-light`
--
DROP TABLE IF EXISTS `mapping-light`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mapping-light` (
`PK_mapping-light` int(11) NOT NULL AUTO_INCREMENT,
`FK_light` int(11) NOT NULL,
`FK_board` int(11) NOT NULL,
`channel` int(11) NOT NULL,
`key` varchar(10) NOT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`PK_mapping-light`),
KEY `FK_light` (`FK_light`),
KEY `FK_board` (`FK_board`),
CONSTRAINT `mapping-light_ibfk_1` FOREIGN KEY (`FK_light`) REFERENCES `light` (`PK_light`),
CONSTRAINT `mapping-light_ibfk_2` FOREIGN KEY (`FK_board`) REFERENCES `board` (`PK_board`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `mapping-light`
--
LOCK TABLES `mapping-light` WRITE;
/*!40000 ALTER TABLE `mapping-light` DISABLE KEYS */;
INSERT INTO `mapping-light` VALUES (1,1,1,0,'r','red'),(2,1,1,1,'g','green'),(3,1,1,2,'b','blue'),(4,2,1,3,'r','red'),(5,2,1,4,'g','green'),(6,2,1,5,'b','blue');
/*!40000 ALTER TABLE `mapping-light` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mapping-preset`
--
DROP TABLE IF EXISTS `mapping-preset`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mapping-preset` (
`PK_mapping-preset` int(11) NOT NULL AUTO_INCREMENT,
`FK_mapping-light` int(11) NOT NULL,
`FK_preset` int(11) NOT NULL,
`value` int(11) NOT NULL,
`channel` varchar(45) NOT NULL,
PRIMARY KEY (`PK_mapping-preset`),
KEY `FK_mapping-light` (`FK_mapping-light`),
KEY `mapping-preset_ibfk_2` (`FK_preset`),
CONSTRAINT `mapping-preset_ibfk_1` FOREIGN KEY (`FK_mapping-light`) REFERENCES `mapping-light` (`PK_mapping-light`),
CONSTRAINT `mapping-preset_ibfk_2` FOREIGN KEY (`FK_preset`) REFERENCES `preset` (`PK_preset`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `mapping-preset`
--
LOCK TABLES `mapping-preset` WRITE;
/*!40000 ALTER TABLE `mapping-preset` DISABLE KEYS */;
INSERT INTO `mapping-preset` VALUES (1,1,1,255,'r'),(2,2,1,18,'r'),(3,2,1,14,'g'),(4,2,1,255,'b'),(5,1,2,255,'r'),(6,2,2,18,'r'),(7,2,2,14,'g'),(8,2,2,255,'b');
/*!40000 ALTER TABLE `mapping-preset` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `preset`
--
DROP TABLE IF EXISTS `preset`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `preset` (
`PK_preset` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(20) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`PK_preset`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `preset`
--
LOCK TABLES `preset` WRITE;
/*!40000 ALTER TABLE `preset` DISABLE KEYS */;
INSERT INTO `preset` VALUES (1,'Test',''),(2,'Test2','Description');
/*!40000 ALTER TABLE `preset` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `type`
--
DROP TABLE IF EXISTS `type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `type` (
`PK_type` int(11) NOT NULL AUTO_INCREMENT,
`key` varchar(20) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`PK_type`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `type`
--
LOCK TABLES `type` WRITE;
/*!40000 ALTER TABLE `type` DISABLE KEYS */;
INSERT INTO `type` VALUES (1,'rgb','RGB','3-Channel RGB stripe'),(2,'switch','ON/OFF switch','1-way ON/OFF switch');
/*!40000 ALTER TABLE `type` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-05-29 2:20:26