2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00
fhem-mirror/fhem/contrib/dblog/db_create_sqlite.sql
johannnes da1111a9dd extended the event column for mysql from 64 to 512 characters
added example SQL for SQLite

git-svn-id: https://svn.fhem.de/fhem/trunk@2770 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2013-02-19 19:28:47 +00:00

3 lines
386 B
SQL

CREATE TABLE current (TIMESTAMP TIMESTAMP, DEVICE varchar(32), TYPE varchar(32), EVENT varchar(512), READING varchar(32), VALUE varchar(32), UNIT varchar(32));
CREATE TABLE history (TIMESTAMP TIMESTAMP, DEVICE varchar(32), TYPE varchar(32), EVENT varchar(512), READING varchar(32), VALUE varchar(32), UNIT varchar(32));
CREATE INDEX Search_Idx ON `history` (DEVICE, READING, TIMESTAMP);