Issue with upgrade and setting the blocktype_installed_viewtypes values correctly
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Mahara | ||||||
21.10 |
Fix Released
|
High
|
Unassigned | |||
22.04 |
Fix Released
|
High
|
Unassigned | |||
22.10 |
Fix Released
|
High
|
Unassigned | |||
23.04 |
Fix Released
|
High
|
Unassigned |
Bug Description
When we add a new view type we update the blocktype_
But if we have an upgrade path where we add two new view types in one upgrade session then the information is not correct from Blocktype:
We need it to ignore this static-ness on upgrade.
To test:
Install a 20.04_STABLE site
Upgrade to main
Run the following command in database:
select * from blocktype_
Should see:
29 (or 30) rows including 'placeholder' and 'image' blocktypes
Actually see:
21 (or 22) rows and 'placeholder' and 'image' blocktypes are missing
Changed in mahara: | |
milestone: | none → 23.04.0 |
importance: | Undecided → High |
status: | New → In Progress |
Changed in mahara: | |
milestone: | 23.04.0 → none |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
no longer affects: | mahara |
Reviewed: https:/ /reviews. mahara. org/c/mahara/ +/13740 /git.mahara. org/mahara/ mahara/ commit/ eb7abacbcbfa906 e9662fd5cb7cfbc 881c005973
Committed: https:/
Submitter: "Robert Lyon <email address hidden>"
Branch: main
commit eb7abacbcbfa906 e9662fd5cb7cfbc 881c005973
Author: Robert Lyon <email address hidden>
Date: Thu Feb 9 11:14:32 2023 +1300
Bug 2006637: Problem with populating blocktype_ installed_ viewtype table
For Blocktype: :get_viewtypes( ) the list it returns is static
so if there are more than one call to it during an upgrade it doesn't
pick up any new viewtypes added after the first call.
In upgrade we need it to not be static
Change-Id: I023b0488929138 a597a5a1ad058c2 c344e23649f
Signed-off-by: Robert Lyon <email address hidden>