fix okapi_syncbase for deleted logs
added database versioning
Merge branch 'master' into next