Commit 35bcd31d authored by nextime's avatar nextime

Modified database to support on db configs

parent 89088322
ALTER TABLE `daemon_config` ADD `lastchange` DECIMAL( 13, 2 ) NOT NULL DEFAULT '0', ADD INDEX ( `lastchange` );
DELIMITER ;;
CREATE TRIGGER config_lastchange BEFORE UPDATE ON daemon_config
FOR EACH ROW
BEGIN
SET NEW.lastchange = TIMESTAMPDIFF(second,'1970-01-01 01:00:00',NOW());
END ;;
CREATE TRIGGER configinsert_lastchange BEFORE INSERT ON daemon_config
FOR EACH ROW
BEGIN
SET NEW.lastchange = TIMESTAMPDIFF(second,'1970-01-01 01:00:00',NOW());
END ;;
DELIMITER ;
...@@ -115,6 +115,7 @@ class domotikaService(service.Service): ...@@ -115,6 +115,7 @@ class domotikaService(service.Service):
alarm=False alarm=False
initialized=False initialized=False
confstatus=False confstatus=False
lastconfigChange = 0
lateststatuschange = 0 lateststatuschange = 0
autocron=False autocron=False
autostatuses=False autostatuses=False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment