Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
35bcd31d
Commit
35bcd31d
authored
Nov 07, 2013
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified database to support on db configs
parent
89088322
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
40-config_trigger.sql
Databases/createdb/40-config_trigger.sql
+14
-0
domotika.py
domotika/domotika.py
+1
-0
No files found.
Databases/createdb/40-config_trigger.sql
0 → 100644
View file @
35bcd31d
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
;
domotika/domotika.py
View file @
35bcd31d
...
...
@@ -115,6 +115,7 @@ class domotikaService(service.Service):
alarm
=
False
initialized
=
False
confstatus
=
False
lastconfigChange
=
0
lateststatuschange
=
0
autocron
=
False
autostatuses
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment