I need to add ctime and mtime to a GPKG sqlite database in table with geometry.
Apparently logic solution: add ctime column with DEFAULT CURRENT_TIMESTAMP and add trigger ON UPDATE to set mtime = CURRENT_TIMESTAMP.
Problem: this works perfectly for non-geometric tables. With geometric tables QGIS complains "Warning 1: geometry column '[ctime|mtime]' of type 'TIMESTAMP' ignored" and moreover when I add a geometric feature using qgis the trigger on mtime seems ignored (probably due to gpkg driver)
Is there a correct way to perform this at db level?