qcodes/dataset/sqlite/db_upgrades/__init__.py
def perform_db_upgrade(conn: ConnectionPlus, version: int = -1) -> None:
    """
    This is intended to perform all upgrades as needed to bring the
    db from version 0 to the most current version (or the version specified).
    All the perform_db_upgrade_X_to_Y functions must raise if they cannot
    upgrade and be a NOOP if the current version is higher than their target.

    Args:
        conn: object for connection to the database
        version: Which version to upgrade to. We count from 0. -1 means
          'newest version'
    """
    version = _latest_available_version() if version == -1 else version

    current_version = get_user_version(conn)
    if current_version < version:
        log.info("Commencing database upgrade")
        for target_version in sorted(_UPGRADE_ACTIONS)[:version]:
            _UPGRADE_ACTIONS[target_version](conn)

    This is intended to perform all upgrades as needed to bring the
    db from version 0 to the most current version (or the version specified).
    All the perform_db_upgrade_X_to_Y functions must raise if they cannot
    upgrade and be a NOOP if the current version is higher than their target.

    Args:
        conn: object for connection to the database
        version: Which version to upgrade to. We count from 0. -1 means
          'newest version'
    
This is intended to perform all upgrades as needed to bring the
db from version 0 to the most current version (or the version specified).
All the perform_db_upgrade_X_to_Y functions must raise if they cannot
upgrade and be a NOOP if the current version is higher than their target.
This is intended to perform all upgrades as needed to bring the db from version 0 to the most current version ( or the version specified ) . All the perform_db_upgrade_X_to_Y functions must raise if they cannot upgrade and be a NOOP if the current version is higher than their target .
def perform_db_upgrade(conn: ConnectionPlus, version: int = -1) -> None:
    version = _latest_available_version() if version == -1 else version
    current_version = get_user_version(conn)
    if current_version < version:
        log.info("Commencing database upgrade")
        for target_version in sorted(_UPGRADE_ACTIONS)[:version]:
            _UPGRADE_ACTIONS[target_version](conn)
def perform_db_upgrade ( conn : ConnectionPlus , version : int = - 1 ) -> None : version = _latest_available_version ( ) if version == - 1 else version current_version = get_user_version ( conn ) if current_version < version : log . info ( "Commencing database upgrade" ) for target_version in sorted ( _UPGRADE_ACTIONS ) [ : version ] : _UPGRADE_ACTIONS [ target_version ] ( conn )
This is intended to perform all upgrades as needed to bring the
db from version 0 to the most current version (or the version specified).
This is intended to perform all upgrades as needed to bring the db from version 0 to the most current version ( or the version specified ) .
"""
    This is intended to perform all upgrades as needed to bring the
    db from version 0 to the most current version (or the version specified).
    All the perform_db_upgrade_X_to_Y functions must raise if they cannot
    upgrade and be a NOOP if the current version is higher than their target.

    Args:
        conn: object for connection to the database
        version: Which version to upgrade to. We count from 0. -1 means
          'newest version'
    """
conn
ConnectionPlus
object for connection to the database
object for connection to the database
version
int
Which version to upgrade to. We count from 0. -1 means
'newest version'
Which version to upgrade to . We count from 0 . - 1 means ' newest version '