--- classes/install/Upgrade.inc.php.upgrade 2008-02-16 04:44:45.710393000 -0800
+++ classes/install/Upgrade.inc.php 2008-02-16 01:50:11.237051000 -0800
@@ -205,5 +205,5 @@
foreach ($settingNames as $oldName => $newName) {
- $result =& $schedConfDao->retrieve('SELECT s.sched_conf_id, c.primary_locale FROM sched_confs s, conferences c, sched_conf_settings scs
WHERE c.conference_id = sc.conference_id AND sc.sched_conf_id = scs.sched_conf_id AND scs.setting_name = ? AND (scs.locale IS NULL OR scs.locale = ?)', array($oldName, ''));
+ $result =& $schedConfDao->retrieve('SELECT sc.sched_conf_id, c.primary_locale FROM sched_confs sc, conferences c, sched_conf_settings scs WHERE c.conference_id = sc.conference_id AND sc.sched_conf_id = scs.sched_conf_id AND scs.setting_name = ? AND (scs.locale IS NULL OR scs.locale = ?)', array($oldName, ''));
while (!$result->EOF) {
$row = $result->GetRowAssoc(false);
@@ -226,8 +226,8 @@
$conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
- $result =& $conferenceDao->retrieve('SELECT g.galley_id, c.primary_locale FROM conferences c, papers p, paper_galleys g WHERE p.conference_id =
c.conference_id AND g.paper_id = p.paper_id AND (g.locale IS NULL OR g.locale =
?)', '');
+ $result =& $conferenceDao->retrieve('SELECT g.galley_id, scs.locale FROM sched_conf_settings scs, papers p, paper_galleys g WHERE p.sched_conf_id = scs.sched_conf_id AND g.paper_id = p.paper_id AND (g.locale IS NULL OR g.locale = ?)', '');
while (!$result->EOF) {
$row = $result->GetRowAssoc(false);
- $paperGalleyDao->update('UPDATE paper_galleys SET locale = ? WHERE galley_id = ?', array($row['primary_locale'], $row['galley_id']));
+ $paperGalleyDao->update('UPDATE paper_galleys SET locale = ? WHERE galley_id = ?', array($row['locale'], $row['galley_id']));
$result->MoveNext();
}
--- dbscripts/xml/upgrade/2.1.0_localize.xml.upgrade 2008-02-16 04:45:03.217620000 -0800
+++ dbscripts/xml/upgrade/2.1.0_localize.xml 2008-02-16 01:27:59.454165000 -0800
@@ -38,6 +38,6 @@
<!-- Localize the sched_confs table -->
<sql>
- <query>INSERT INTO sched_conf_settings (sched_conf_id, conference_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, sc.conference_id, 'title', title, 'string', c.primary_locale FROM conferences
c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
- <query>INSERT INTO sched_conf_settings (sched_conf_id, conference_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, sc.conference_id, 'description', description, 'string', c.primary_locale FROM
conferences c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
+ <query>INSERT INTO sched_conf_settings (sched_conf_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, 'title', sc.title, 'string', c.primary_locale FROM conferences c, sched_confs sc WHERE c.conference_id = sc.conference_id</query>
+ <query>INSERT INTO sched_conf_settings (sched_conf_id, setting_name, setting_value, setting_type, locale) SELECT sc.sched_conf_id, 'description', sc.description, 'string', c.primary_locale FROM conferences c, sched_confs sc
WHERE c.conference_id = sc.conference_id</query>
</sql>
--- dbscripts/xml/upgrade.xml.upgrade 2008-02-16 04:45:21.852180000 -0800
+++ dbscripts/xml/upgrade.xml 2008-02-16 01:08:50.611666000 -0800
@@ -16,6 +16,6 @@
<!-- #2961: Stage 1 of 2.1 schema upgrade: Do not drop columns yet -->
<upgrade minversion="2.0.0.0" maxversion="2.0.0.1">
- <schema file="ocs_schema_stage1.xml" />
<data file="upgrade/2.1.0_preupdate.xml" />
+ <schema file="ocs_schema_stage1.xml" />
<code function="dropAllIndexes" />
</upgrade>
@@ -23,6 +23,6 @@
<!-- Upgrade to version 2.1.0 -->
<upgrade minversion="2.0.0.0" maxversion="2.0.0.1">
- <data file="upgrade/2.1.0_localize.xml" />
<code function="setConferencePrimaryLocales" />
+ <data file="upgrade/2.1.0_localize.xml" />
<code function="localizeConferenceSettings" />
<code function="localizeSchedConfSettings" />
asmecher wrote:Thanks -- FYI, the upgrade process from OCS 2.0 to what will be OCS 2.1 will not be tested or refined until the end of the release process, so you're in uncharted territory.
...
(mysql): SHOW COLUMNS FROM site
(mysql): ALTER TABLE site CHANGE COLUMN locale primary_locale
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
adodb_mysql._execute(ALTER TABLE site CHANGE COLUMN locale primary_locale , false) % line 864, file: adodb.inc.php
adodb_mysql.execute(ALTER TABLE site CHANGE COLUMN locale primary_locale ) % line 431, file: Installer.inc.php
upgrade.executesql(ALTER TABLE site CHANGE COLUMN locale primary_locale ) % line 422, file: Installer.inc.php
upgrade.executesql(Array[1]) % line 422, file: Installer.inc.php
upgrade.executesql(Array[1]) % line 387, file: Installer.inc.phpUsers browsing this forum: No registered users and 1 guest