def doUpgrade(sqlStore):
    """
    Do the UUID-normalization upgrade if necessary and then bump the data
    version to indicate that it's been done.
    """
    yield fixUUIDNormalization(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the UUID-normalization upgrade if necessary and then bump the data
    version to indicate that it's been done.
    """
    yield fixUUIDNormalization(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(
        sqlStore, UPGRADE_TO_VERSION
    )
예제 #3
0
 def test_fixUUIDNormalization_lowerToUpper(self):
     """
     L{fixUUIDNormalization} will fix the normalization of UUIDs.  If a home
     is found with the wrong case but no duplicate, it will simply be
     upper-cased.
     """
     t1 = self.transactionUnderTest()
     yield t1.calendarHomeWithUID(denormalizedUID, create=True)
     yield self.commit()
     yield fixUUIDNormalization(self.storeUnderTest())
     self.assertEqual(map(list, (yield self.allHomeUIDs())),
                      [[normalizedUID]])
예제 #4
0
 def test_fixUUIDNormalization_lowerToUpper_addressbook(self):
     """
     L{fixUUIDNormalization} will fix the normalization of UUIDs.  If a home
     is found with the wrong case but no duplicate, it will simply be
     upper-cased.
     """
     t1 = self.transactionUnderTest()
     yield t1.addressbookHomeWithUID(denormalizedUID, create=True)
     yield self.commit()
     yield fixUUIDNormalization(self.storeUnderTest())
     self.assertEqual(
         map(list, (yield self.allHomeUIDs(schema.ADDRESSBOOK_HOME))),
         [[normalizedUID]]
     )