added version / sync tables and fixed bug in db-19