mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #37273
[Bug 1613135] A change has been merged
Reviewed: https://reviews.mahara.org/6877
Committed: https://git.mahara.org/mahara/mahara/commit/e7107840209c5f2d911307c13ad668054b5eabbb
Submitter: Son Nguyen (son.nguyen@xxxxxxxxxxxxxxx)
Branch: 16.04_STABLE
commit e7107840209c5f2d911307c13ad668054b5eabbb
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Mon Aug 15 13:27:10 2016 +1200
Bug 1613135: Better handling for negative block sort on upgrade
If there are negative block_instance.order values in the database,
then we'll just drop and re-create the unique key on the column.
behatnotneeded: Covered by existing tests
Change-Id: I3ef1507f82ae3dc24244e6236e173b6649a95d3b
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1613135
Title:
Fix negative block_instance sortorders before running upgrade
Status in Mahara:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
In Progress
Status in Mahara 16.10 series:
In Progress
Bug description:
See:
https://mahara.org/interaction/forum/topic.php?id=7687&offset=0&limit=10#post30945
For Bug 1528351 we added an upgrade block that corrects the
block_instance sortorder drift that had been created by Bug 1523719.
As a workaround to the uniqueness constraint on that column, this
block temporarily moves the sortorders into the negative integerspace,
and then re-orders them as positive numbers.
However, we've had multiple reports of sites that have somehow got
negative numbers already in their block_instance.sortorder column.
These sites then error out during the upgrade, because the extant
negative numbers turn into positive numbers, and then there's a
uniqueness violation if another block being re-ordered overlaps with
it.
Ghada has written up a block of code that can fix this, and we've
shared it with some affected sites via the forum. It should be easy to
add it to the basic upgrade script, though. In order to reduce
complications, we could preface it with a check to see whether there
are negative sortorders in the database, and only run this additional
step if we find any negatives.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1613135/+subscriptions
References