Example #1
0
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """

    sqlTxn = sqlStore.newTransaction(
        label="calendar_upgrade_from_5_to_6.doUpgrade")
    cb = schema.CALENDAR_BIND

    # Fix shared calendar alarms which should default to "empty"
    yield Update(
        {
            cb.ALARM_VEVENT_TIMED: "empty",
            cb.ALARM_VEVENT_ALLDAY: "empty",
            cb.ALARM_VTODO_TIMED: "empty",
            cb.ALARM_VTODO_ALLDAY: "empty",
        },
        Where=(cb.BIND_MODE != _BIND_MODE_OWN)).on(sqlTxn)

    # Fix inbox transparency which should always be True
    yield Update({
        cb.TRANSP: _TRANSP_TRANSPARENT,
    },
                 Where=(cb.CALENDAR_RESOURCE_NAME == "inbox")).on(sqlTxn)
    yield sqlTxn.commit()

    # Always bump the DB value
    yield updateAllCalendarHomeDataVersions(sqlStore, UPGRADE_TO_VERSION)
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """

    sqlTxn = sqlStore.newTransaction()
    cb = schema.CALENDAR_BIND

    # Fix shared calendar alarms which should default to "empty"
    yield Update(
        {
            cb.ALARM_VEVENT_TIMED: "empty",
            cb.ALARM_VEVENT_ALLDAY: "empty",
            cb.ALARM_VTODO_TIMED: "empty",
            cb.ALARM_VTODO_ALLDAY: "empty",
        },
        Where=(cb.BIND_MODE != _BIND_MODE_OWN)
    ).on(sqlTxn)

    # Fix inbox transparency which should always be True
    yield Update(
        {
            cb.TRANSP: _TRANSP_TRANSPARENT,
        },
        Where=(cb.CALENDAR_RESOURCE_NAME == "inbox")
    ).on(sqlTxn)
    yield sqlTxn.commit()

    # Always bump the DB value
    yield updateAllCalendarHomeDataVersions(sqlStore, UPGRADE_TO_VERSION)
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield moveSupportedComponentSetProperties(sqlStore)
    yield splitCalendars(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield moveSupportedComponentSetProperties(sqlStore)
    yield splitCalendars(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
Example #5
0
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
    )
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield moveCalendarTimezoneProperties(sqlStore)
    yield moveCalendarAvailabilityProperties(sqlStore)
    yield removeOtherProperties(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
    yield updateAllCalendarHomeDataVersions(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield moveDefaultCalendarProperties(sqlStore)
    yield moveCalendarTranspProperties(sqlStore)
    yield moveDefaultAlarmProperties(sqlStore)
    yield removeResourceType(sqlStore)

    # Always bump the DB value
    yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
    yield updateAllCalendarHomeDataVersions(sqlStore, UPGRADE_TO_VERSION)
Example #9
0
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield updateCalendarHomes(sqlStore, config.UpgradeHomePrefix)

    # Don't do remaining upgrade if we are only process a subset of the homes
    if not config.UpgradeHomePrefix:
        yield removeResourceType(sqlStore)

        # Always bump the DB value
        yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)
def doUpgrade(sqlStore):
    """
    Do the required upgrade steps.
    """
    yield updateCalendarHomes(sqlStore, config.UpgradeHomePrefix)

    # Don't do remaining upgrade if we are only process a subset of the homes
    if not config.UpgradeHomePrefix:
        yield removeResourceType(sqlStore)

        # Always bump the DB value
        yield updateCalendarDataVersion(sqlStore, UPGRADE_TO_VERSION)