Author: david
Date: Thu May 3 15:47:42 2012
New Revision: 11615
Log:
Test for Release 1.2 upgrade version bug
Modified:
trunk/lib/task/migrate/arUpgradeSqlTask.class.php
Modified: trunk/lib/task/migrate/arUpgradeSqlTask.class.php
==============================================================================
--- trunk/lib/task/migrate/arUpgradeSqlTask.class.php Thu May 3 15:21:13
2012 (r11614)
+++ trunk/lib/task/migrate/arUpgradeSqlTask.class.php Thu May 3 15:47:42
2012 (r11615)
@@ -64,6 +64,21 @@
{
$this->getInitialVersion();
+ // A bug in the migration script for Release 1.1 left the version="62"
+ // instead of "75", so we need to check if the user is upgrading from 1.1
+ // or 1.2
+ if (62 == intval($this->initialVersion))
+ {
+ // Check if "accession_mask" setting exists
+ $sql = "SELECT id FROM setting WHERE name='accession_mask';";
+
+ var_dump(QubitPdo::fetchOne($sql));
+ if (null !== QubitPdo::fetchOne($sql))
+ {
+ $this->initialVersion = 75;
+ }
+ }
+
// Use old migration script for versions before 75
if (null == $this->initialVersion || 75 > $this->initialVersion)
{
@@ -94,7 +109,6 @@
$this->logSection('upgrade-sql', sprintf('Upgrading from version %s',
$this->initialVersion));
- // TODO Version 75 check
// TODO Dump database
// TODO Do upgrade
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.