Storing history metadata and var substiution
create table query built