What do I have to do to get Core Data to automatically migrate models?

I’ve now found out that this is quite simple – once you know where to look. In my AppDelegate I set-up the NSPersistentStoreCoordinator – and you need to add some options to this to tell it to handle auto-migrate: NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSError *error; _persistentStoreCoordinator = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)