Skip to content
Snippets Groups Projects
  • Nikolay Shirokovskiy's avatar
    ec68a471
    box: support downgrading of system spaces · ec68a471
    Nikolay Shirokovskiy authored
    See documentation below for details.
    
    By the way fix `grant_rw_access_on__session_settings_to_role_public` of
    upgrade to be idempotent. The changes made by the function are not reverted
    on downgrade thus we need this fix to be able to downgrade and then
    upgrade back.
    
    Part of #7718
    
    @TarantoolBot document
    Title: Document box.schema.downgrade etc
    
    Downgrade makes possible to run database on older versions on Tarantool.
    Typical usage is next (running on 2.11.0 in the example below):
    
    tarantool> box.schema.downgrade('2.10.0')
    tarantool> box.snapshot()
    tarantool> os.exit()
    
    After this command you can run database on Tarantool version 2.10.0
    or later. `box.schema.downgrade` only takes version listed in
    `box.schema.downgrade_versions()` which is a list of all releases
    since 2.8.2.
    
    `downgrade` will fail if downgrading is not possible without losing
    data in system spaces. This can be the case if you used functionality
    introduced in newer version. For example if you used tuple constraints
    intoroduced in version 2.10.0:
    
    NO_WRAP
    tarantool> box.schema.downgrade('2.8.4')
    ---
    - error: 'builtin/box/upgrade.lua:1860: Tuple constraint is found in space ''pos_in_box''.
        It is supported starting from version 2.10.0. There are more downgrade issues.
        To list them all call box.schema.downgrade_issues.'
    ...
    NO_WRAP
    
    In the example above there are more then one issues with downgrade and
    only first encountered is reported. To see all issues preventing
    downgrade use `box.schema.downgrade_issues`:
    
    NO_WRAP
    tarantool> box.schema.downgrade_issues('2.8.4')
    ---
    - - Tuple constraint is found in space 'pos_in_box'. It is supported starting from
        version 2.10.0.
      - Tuple constraint is found in space 'pos_in_circle'. It is supported starting from
        version 2.10.0.
    ...
    NO_WRAP
    ec68a471
    History
    box: support downgrading of system spaces
    Nikolay Shirokovskiy authored
    See documentation below for details.
    
    By the way fix `grant_rw_access_on__session_settings_to_role_public` of
    upgrade to be idempotent. The changes made by the function are not reverted
    on downgrade thus we need this fix to be able to downgrade and then
    upgrade back.
    
    Part of #7718
    
    @TarantoolBot document
    Title: Document box.schema.downgrade etc
    
    Downgrade makes possible to run database on older versions on Tarantool.
    Typical usage is next (running on 2.11.0 in the example below):
    
    tarantool> box.schema.downgrade('2.10.0')
    tarantool> box.snapshot()
    tarantool> os.exit()
    
    After this command you can run database on Tarantool version 2.10.0
    or later. `box.schema.downgrade` only takes version listed in
    `box.schema.downgrade_versions()` which is a list of all releases
    since 2.8.2.
    
    `downgrade` will fail if downgrading is not possible without losing
    data in system spaces. This can be the case if you used functionality
    introduced in newer version. For example if you used tuple constraints
    intoroduced in version 2.10.0:
    
    NO_WRAP
    tarantool> box.schema.downgrade('2.8.4')
    ---
    - error: 'builtin/box/upgrade.lua:1860: Tuple constraint is found in space ''pos_in_box''.
        It is supported starting from version 2.10.0. There are more downgrade issues.
        To list them all call box.schema.downgrade_issues.'
    ...
    NO_WRAP
    
    In the example above there are more then one issues with downgrade and
    only first encountered is reported. To see all issues preventing
    downgrade use `box.schema.downgrade_issues`:
    
    NO_WRAP
    tarantool> box.schema.downgrade_issues('2.8.4')
    ---
    - - Tuple constraint is found in space 'pos_in_box'. It is supported starting from
        version 2.10.0.
      - Tuple constraint is found in space 'pos_in_circle'. It is supported starting from
        version 2.10.0.
    ...
    NO_WRAP