2007-12-30 21:51:16 +00:00
|
|
|
CREATE DATABASE `fhem` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
|
|
|
|
CREATE USER 'fhemuser'@'%' IDENTIFIED BY 'fhempassword';
|
2016-09-05 07:02:35 +00:00
|
|
|
CREATE TABLE `fhem`.`history` (TIMESTAMP TIMESTAMP, DEVICE varchar(64), TYPE varchar(64), EVENT varchar(512), READING varchar(64), VALUE varchar(128), UNIT varchar(32));
|
|
|
|
CREATE TABLE `fhem`.`current` (TIMESTAMP TIMESTAMP, DEVICE varchar(64), TYPE varchar(64), EVENT varchar(512), READING varchar(64), VALUE varchar(128), UNIT varchar(32));
|
2013-05-18 17:08:13 +00:00
|
|
|
GRANT SELECT, INSERT, DELETE, UPDATE ON `fhem`.* TO 'fhemuser'@'%';
|
2013-02-03 21:00:18 +00:00
|
|
|
CREATE INDEX Search_Idx ON `fhem`.`history` (DEVICE, READING, TIMESTAMP);
|
2007-12-30 21:51:16 +00:00
|
|
|
|