Last active
February 29, 2016 16:47
-
-
Save mkorman/2dd337493181beb02586 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class PostInstallScript implements InstallHandler { | |
global void onInstall (InstallContext context) | |
{ | |
// Only initialize package on a fresh install! | |
if (context.previousVersion == null) | |
{ | |
InitializePackage(); | |
} | |
// Migrate data, but only for versions older than 1.2 | |
else if (context.previousVersion().CompareTo(new Version (1,2)) < 0) | |
{ | |
UpgradeForFeature12(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment