From f1f8bc17c697b273bee2c931e5d0ffc421bf2373 Mon Sep 17 00:00:00 2001
From: Vladimir Davydov <vdavydov@tarantool.org>
Date: Thu, 12 Jan 2023 14:04:21 +0300
Subject: [PATCH] box: fix collation strength upgrade

Since commit 85ebbcc0bd73 ("box: reset system space formats for
bootstrap"), it's illegal to use field names in the upgrade script.
The commit missed one place: upgrade of collation strength. Fix it.

NO_DOC=unreleased
NO_CHANGELOG=unreleased
NO_TEST=checked by upgrade script tests
---
 src/box/lua/upgrade.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua
index 2c7da702eb..f2c4d6eb8e 100644
--- a/src/box/lua/upgrade.lua
+++ b/src/box/lua/upgrade.lua
@@ -826,10 +826,10 @@ end
 local function update_collation_strength_field()
     local _collation = box.space[box.schema.COLLATION_ID]
     for _, collation in _collation:pairs() do
-        if collation.type == 'ICU' and collation.opts.strength == nil then
+        if collation[4] == 'ICU' and collation[6].strength == nil then
             local new_collation = collation:totable()
             new_collation[6].strength = 'tertiary'
-            _collation:delete{collation.id}
+            _collation:delete{collation[1]}
             _collation:insert(new_collation)
         end
     end
-- 
GitLab