Why are persistence records not deleted when the item is deleted?

I am well aware of this, and there are a series of PR’s that have not been reviewed and accepted to solve this. Strategies would not be applied automatically anymore, There would have to be an explicit configuration. See Persistence no default strategies and persistence configuration health check by mherwege · Pull Request #4682 · openhab/openhab-core · GitHub , Persistence strategies not automatically applied by mherwege · Pull Request #3123 · openhab/openhab-webui · GitHub and Breaking change alert: persistence no default by mherwege · Pull Request #1737 · openhab/openhab-distro · GitHub . This recent PR Do not require `Strategies{}` in `persistence/` files by dilyanpalauzov · Pull Request #5094 · openhab/openhab-core · GitHub has similar arguments for proposing a change.

That being said, overall I think it would be a bad idea to automatically delete persisted data if an item is removed, changed, or its persistence configuration is changed or removed.

1 Like