title: MyModel.objects.update_or_create() --> Boolean wether data was updated or not?
body: <p>AFAIK Django does not provide a generic way to see if data was changed by <a href="https://docs.djangoproject.com/en/1.11/ref/models/querysets/#update-or-create" rel="noreferrer">update_or_create()</a></p>
  
  <p>The boolean <code>created</code> tells me that a row was created. But how can I know if data was changed (SQL UPDATE which changed data)</p>
  
  <p>Example:</p>
  
  <pre><code>obj, created = MyModel.update_or_create(pk=12345,
                         defaults=dict(name='Doctor Zhivago'))
  </code></pre>
  
  <p>There are three cases:</p>
  
  <ol>
  <li><code>obj</code> was created. No problem, I have the boolean variable <code>created</code></li>
  <li><code>obj</code> was not created, it was updated. For example the previous name was "Machuca".</li>
  <li><code>obj</code> was not created and not updated. For example the previous name was already "Doctor Zhivago".</li>
  </ol>
  
  <p>I can't distinguish between case2 and case3 at the moment.</p>