I have an un-managed package with a custom object. I've added many custom fields to the object. I want to add a new release of the app but I have to delete the first app..along with the custom object. How do I preserve the custom fields and add them to the new release of the app and object?
1 Answer
If possible, see if you can't just get a open-source version of the package, pull it into the Force.com IDE, then deploy the changes to your org. This would be a lot less painful than the alternatives. Since unmanaged packages are not versioned, there really isn't any drawback to just updating the source code directly. Along a similar design, install the package into a new developer org, pull the source code into the Force.com IDE, and then deploy it to your destination.
Otherwise, the next best thing would be to install the new package, and choose to "rename" duplicate components during the installation. You'll have a lot of fun cleaning up the aftermath of doing this, but at least your data won't be lost. Obviously, this may fail for a variety of reasons, but you should at least try this. It might save you a lot of work.
If that fails for whatever reason, you'll have to back up your customizations (e.g. pull them in to the Force.com IDE), back up your data using the Apex Data Loader, uninstall the package, install the new package, deploy your customizations atop the new installation, and then restoring your data using the Apex Data Loader.