Skip to content

Instantly share code, notes, and snippets.

@wimleers
Created November 5, 2023 19:51
Show Gist options
  • Save wimleers/2556ae589fad400f082bfeb20eace4a4 to your computer and use it in GitHub Desktop.
Save wimleers/2556ae589fad400f082bfeb20eace4a4 to your computer and use it in GitHub Desktop.
cp mqtt.db ebusd-from-mqtt.db
sqlite3 ebusd-from-mqtt.db "DROP TRIGGER mqtt_after_insert; DROP TRIGGER mqtt_after_update;ALTER TABLE mqtt DROP qos; ALTER TABLE mqtt DROP retain; ALTER TABLE mqtt DROP history_enable; ALTER TABLE mqtt DROP history_diffonly; UPDATE mqtt SET ts=datetime(ts, '-1 hour'); UPDATE mqtt_history SET ts=datetime(ts, '-1 hour');"
sqlite3 ebusd-from-mqtt.db < newtriggers.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment