summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/data
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2021-04-03 20:13:56 -0500
committer cracyc <cracyc@users.noreply.github.com>2021-04-03 20:13:56 -0500
commit9c14a66139512012f336062409c5beb2b930d151 (patch)
tree65a10c5de5d9442fcff9f523a9f03b3a1c565b81 /plugins/data
parent82222e9b73bfda31100683c65e3105775ce4fdfc (diff)
plugins/data: properly clear history data when loading new file
Diffstat (limited to 'plugins/data')
-rw-r--r--plugins/data/data_history.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/data/data_history.lua b/plugins/data/data_history.lua
index fbc6e2048bf..78a43e1fd5e 100644
--- a/plugins/data/data_history.lua
+++ b/plugins/data/data_history.lua
@@ -80,6 +80,8 @@ local function init()
if dbver then
db.exec("DELETE FROM \"" .. file .. "\"")
db.check("deleting history")
+ db.exec("DELETE FROM \"" .. file .. "_idx\"")
+ db.check("deleting index")
stmt = db.prepare("UPDATE version SET version = ? WHERE datfile = ?")
db.check("updating history version")
else