title: Enable Automatic Lightweight Migration of Core Data on NSPersistentDocument
body: <p>ALM is great. But I can't get it to work on a project that uses Core Data with NSDocument. It seems that ALM is disabled by default.</p>
  
  <p>Fine. For any normal project, you'd add the two appropriate options to the dictionary in this line:</p>
  
  <pre><code>if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&amp;error])
  </code></pre>
  
  <p>...but that line doesn't exist when using CD with NSD (NSPersistentDocument hides the details and I can't see how you can modify them).</p>
  
  <p>The following method seems to offer hope:</p>
  
  <pre><code>configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:
  </code></pre>
  
  <p>...some people on mailing lists (from 4+ years ago) report success overriding that method, altering the options dictionary, and then re-invoking it on "super". That didn't work for me, sadly. I would advise trying that first if you have similar problems - then come back here if it still doesn't work :)</p>