upgrade: fix upgrading from schema 1.6.9
This commit fixes some cases of upgrading schema from 1.6.9: 1. Fix updating empty password for users. In 1.6 credentials were array in _user, in 1.7.5 they became map. 2. Automatically update the format of user spaces. Format of system spaces have been properly fixed during upgrade to 1.7.5. However, commit 519bc82e ("Parse and validate space formats") introduced strict checking of format field in 1.7.6. So, the format of user spaces should be also fixed. Back in 1.6 days, it was allowed to write anything in space format. This commit only fixes valid uses of format: {name = 'a', type = 'number'} {'a', type = 'number'} {'a', 'num'} {'a'} Invalid use of format (e.g. {{}}, or {{5, 'number'}} will cause error anyway. User has to fix the format on old version and only after that start a new one. This commit also introduces the test, which checks, that we can properly upgrade from 1.6.9 to the latest versions, at least in basic cases. Closes #10180 NO_DOC=bugfix (cherry picked from commit f69e2ae488b3620e31f1a599d8fb78a66917dbfd)
Showing
- changelogs/unreleased/gh-10180-upgrade-from-1-6.md 4 additions, 0 deletionschangelogs/unreleased/gh-10180-upgrade-from-1-6.md
- src/box/lua/upgrade.lua 56 additions, 1 deletionsrc/box/lua/upgrade.lua
- test/box-luatest/gh_10180_upgrade_from_1_6_9_test.lua 27 additions, 0 deletionstest/box-luatest/gh_10180_upgrade_from_1_6_9_test.lua
- test/box-luatest/upgrade/1.6.9/00000000000000000033.snap 0 additions, 0 deletionstest/box-luatest/upgrade/1.6.9/00000000000000000033.snap
- test/box-luatest/upgrade/1.6.9/gen.lua 62 additions, 0 deletionstest/box-luatest/upgrade/1.6.9/gen.lua
Loading
Please register or sign in to comment