ndo enhancements

This pull request provide
- bug fix to synchronize_database_id : the option was olways on
- manage historical datas in historical tables