Commit 5c94ae5f by Hugo Beauzée-Luyssen

Folder: Avoid triggering presence change when it actually didn't change

parent 51309ebc
......@@ -95,6 +95,7 @@ void Folder::createTable( sqlite::Connection* connection)
")";
std::string triggerReq = "CREATE TRIGGER IF NOT EXISTS is_device_present AFTER UPDATE OF is_present ON "
+ policy::DeviceTable::Name +
" WHEN old.is_present != new.is_present"
" BEGIN"
" UPDATE " + policy::FolderTable::Name + " SET is_present = new.is_present WHERE device_id = new.id_device;"
" END";
......
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