sPSecretPalTable.addUniqueIndex("uniqueSecretPal", sPSecretPalTable.existingColumnNamed("eventID"), sPSecretPalTable.existingColumnNamed("giverID"), sPSecretPalTable.existingColumnNamed("receiverID"));
}
public void postUpgrade(EOEditingContext editingContext, EOModel model) throws Throwable {
SPPerson admin = SPPerson.createSPPerson(editingContext, Boolean.TRUE, "admin@secretpal.com", Boolean.FALSE, "John Administrator");
admin.setPlainTextPassword("adminadmin");
SPPerson gary = SPPerson.createSPPerson(editingContext, Boolean.FALSE, "test1@secretpal.com", Boolean.FALSE, "Robert Test");
gary.setPlainTextPassword("test1");
SPPerson mary = SPPerson.createSPPerson(editingContext, Boolean.FALSE, "test2@secretpal.com", Boolean.FALSE, "Mary Example");
mary.setPassword(null);
SPGroup testGroup = SPGroup.createSPGroup(editingContext, "The Example Crew", admin);
testGroup.setDescription("This is the example group for testing Secret Pal.");
SPMembership.createSPMembership(editingContext, Boolean.TRUE, Boolean.TRUE, testGroup, admin);
SPMembership.createSPMembership(editingContext, Boolean.FALSE, Boolean.TRUE, testGroup, gary);