mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #16283
[Bug 1262932] A change has been merged
Reviewed: https://reviews.mahara.org/2833
Committed: http://gitorious.org/mahara/mahara/commit/2df7d4eab0b9495f6501cc4e4048f801fa92f313
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 2df7d4eab0b9495f6501cc4e4048f801fa92f313
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Fri Dec 20 13:41:05 2013 +1300
Bug 1262932: Let upgrade proceed even if schema drift can't be corrected
In 1.8.1 we added some code to correct schema drift in Mahara sites that
were originally installed with 1.2.0 or earlier. But, these schema
corrections can fail if the tables contain data that violates the
constraints we're trying to add.
This update changes that failure from a fatal error, to a warning.
Change-Id: I51989b276642b8d1b7b55813aa33df86f1e52a5c
--
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/1262932
Title:
Bad data in the DB can cause the schema correction SQL to throw a
fatal error
Status in Mahara ePortfolio:
In Progress
Bug description:
Looking at this forum post
https://mahara.org/interaction/forum/topic.php?id=5986&offset=0&limit=10
...
It occurs to me that there's a problem in our schema correction code.
We're adding foreign keys to existing tables, but we didn't first
check to see whether the tables have data that will fit that foreign
key. If they have bad data, then this upgrade script will error out
and prevent them from upgrading. And since these missing schema
elements are not vital, we don't want their failure to block upgrade.
We should have put a "catch (SQLException $e)" block around each
attempt to add a foreign key, unique index, and/or primary key, or
another other schema element that will fail if their data isn't clean.
:-P
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1262932/+subscriptions
References