[beeswax] Support migration of query history