Sync database changes