Intial Commit

This commit is contained in:
valki
2020-10-17 18:42:50 +02:00
commit 664c6d8ca3
5892 changed files with 759183 additions and 0 deletions

5
mariadb/Dockerfile Executable file
View File

@@ -0,0 +1,5 @@
FROM mariadb:latest
#RUN chown 1000:1000 /data
COPY rootfs /

4
mariadb/Makefile Executable file
View File

@@ -0,0 +1,4 @@
build:
docker build $(BUILD_ARGS) -t $(OPENAGER_REPO)/mariadb .
.PHONY: build

View File

@@ -0,0 +1,34 @@
CREATE DATABASE IF NOT EXISTS `openager` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `openager`;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `sensor_aggr`
--
CREATE TABLE IF NOT EXISTS `sensor_aggr` (
`epoch` bigint(20) NOT NULL,
`device` varchar(255) NOT NULL,
`sensor` varchar(255) NOT NULL,
`value` double NOT NULL,
PRIMARY KEY (`epoch`,`device`,`sensor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `sensor_data`
--
CREATE TABLE IF NOT EXISTS `sensor_data` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`device` text NOT NULL,
`sensor` text NOT NULL,
`value` double NOT NULL,
`epoch` bigint(20) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `sensor_data_idx1` (`timestamp`),
KEY `sensor_data_idx2` (`epoch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;