a
This commit is contained in:
60
schema/eco_saver_api-logs.sql
Normal file
60
schema/eco_saver_api-logs.sql
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,3 @@
|
||||
CREATE DATABASE IF NOT EXISTS `eco_saver` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
|
||||
USE `eco_saver`;
|
||||
-- MySQL dump 10.13 Distrib 8.0.34, for Win64 (x86_64)
|
||||
--
|
||||
-- Host: mpsqldatabase.mysql.database.azure.com Database: eco_saver
|
||||
@ -18,34 +16,32 @@ USE `eco_saver`;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `api-logs`
|
||||
-- Table structure for table `locations`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `api-logs`;
|
||||
DROP TABLE IF EXISTS `locations`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `api-logs` (
|
||||
CREATE TABLE `locations` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`ip` varchar(45) NOT NULL,
|
||||
`time` varchar(30) NOT NULL,
|
||||
`method` varchar(10) NOT NULL,
|
||||
`host` varchar(45) NOT NULL,
|
||||
`statusCode` varchar(10) NOT NULL,
|
||||
`responsesize` varchar(10) NOT NULL,
|
||||
`referrer` varchar(45) NOT NULL,
|
||||
`useragent` varchar(150) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
`name` varchar(255) NOT NULL,
|
||||
`added_by` varchar(255) NOT NULL,
|
||||
`description` varchar(255) DEFAULT NULL,
|
||||
`createdAt` datetime DEFAULT NULL,
|
||||
`updatedAt` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `api-logs`
|
||||
-- Dumping data for table `locations`
|
||||
--
|
||||
|
||||
LOCK TABLES `api-logs` WRITE;
|
||||
/*!40000 ALTER TABLE `api-logs` DISABLE KEYS */;
|
||||
INSERT INTO `api-logs` VALUES (1,'::1','Fri, 29 Dec 2023 09:21:29 GMT','GET','http://localhost/api/test','200','0','none','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'),(2,'::1','Fri, 29 Dec 2023 09:21:49 GMT','GET','http://localhost/api/test','200','0','none','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36');
|
||||
/*!40000 ALTER TABLE `api-logs` ENABLE KEYS */;
|
||||
LOCK TABLES `locations` WRITE;
|
||||
/*!40000 ALTER TABLE `locations` DISABLE KEYS */;
|
||||
INSERT INTO `locations` VALUES (1,'Ang Mo Kio','system','system generated location','2024-01-05 10:59:05','2024-01-05 10:59:05'),(2,'Bishan','system','system generated location','2024-01-05 10:59:06','2024-01-05 10:59:06'),(3,'Tampines','system','system generated location','2024-01-05 10:59:07','2024-01-05 10:59:07'),(4,'Jurong','system','system generated location','2024-01-05 10:59:07','2024-01-05 10:59:07'),(5,'Marine Parade','system','system generated location','2024-01-05 10:59:08','2024-01-05 10:59:08'),(6,'Woodlands ','system','system generated location','2024-01-05 10:59:08','2024-01-05 10:59:08');
|
||||
/*!40000 ALTER TABLE `locations` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
@ -57,4 +53,4 @@ UNLOCK TABLES;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2023-12-29 17:25:40
|
||||
-- Dump completed on 2024-01-05 19:38:57
|
63
schema/eco_saver_sensordata.sql
Normal file
63
schema/eco_saver_sensordata.sql
Normal file
File diff suppressed because one or more lines are too long
62
schema/eco_saver_sensors.sql
Normal file
62
schema/eco_saver_sensors.sql
Normal file
@ -0,0 +1,62 @@
|
||||
-- MySQL dump 10.13 Distrib 8.0.34, for Win64 (x86_64)
|
||||
--
|
||||
-- Host: mpsqldatabase.mysql.database.azure.com Database: eco_saver
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.34
|
||||
|
||||
/*!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 */;
|
||||
/*!50503 SET NAMES utf8 */;
|
||||
/*!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 `sensors`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `sensors`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `sensors` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`added_by` varchar(255) NOT NULL,
|
||||
`mac_address` varchar(255) NOT NULL,
|
||||
`description` varchar(255) DEFAULT NULL,
|
||||
`locationid` int DEFAULT NULL,
|
||||
`createdAt` datetime DEFAULT NULL,
|
||||
`updatedAt` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`),
|
||||
UNIQUE KEY `name` (`name`),
|
||||
UNIQUE KEY `mac_address` (`mac_address`),
|
||||
KEY `locationid` (`locationid`),
|
||||
CONSTRAINT `sensors_ibfk_1` FOREIGN KEY (`locationid`) REFERENCES `locations` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `sensors`
|
||||
--
|
||||
|
||||
LOCK TABLES `sensors` WRITE;
|
||||
/*!40000 ALTER TABLE `sensors` DISABLE KEYS */;
|
||||
INSERT INTO `sensors` VALUES (1,'AQI-586','system','55-1a-c4-0e-7a-80','system generated sensor',1,'2024-01-05 10:59:06','2024-01-05 10:59:06'),(2,'AQI-852','system','b9-b9-68-83-be-bd','system generated sensor',2,'2024-01-05 10:59:07','2024-01-05 10:59:07'),(3,'AQI-242','system','a2-93-fd-3d-34-b9','system generated sensor',3,'2024-01-05 10:59:07','2024-01-05 10:59:07'),(4,'AQI-635','system','1a-3a-69-c8-00-77','system generated sensor',4,'2024-01-05 10:59:08','2024-01-05 10:59:08'),(5,'AQI-683','system','8e-d8-be-5c-46-3a','system generated sensor',5,'2024-01-05 10:59:08','2024-01-05 10:59:08'),(6,'AQI-519','system','f7-a7-3f-9b-1f-1c','system generated sensor',6,'2024-01-05 10:59:09','2024-01-05 10:59:09');
|
||||
/*!40000 ALTER TABLE `sensors` 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 2024-01-05 19:39:03
|
Reference in New Issue
Block a user