syncWholeTable

Needs cleaner and more efficent code