Changes in DBSync history and sqlite mostly
Moved get_where to db\connection