Questions on getting Xerte Toolkits installed on your server and questions about authentication and user logins.

Missing tables whilst trying to upgrade to v3.12.29

  • a511197
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
2 jaren 2 maanden geleden #9043 door a511197
Hi Xerte developers,

Our Application Development Team encountered an error when applying 'function upgrade_36()' in the ‘upgrade.php’ on the new Xerte version 3.12 (v3.12.29) as our xerte DB does not have the tables below:

- oai_education and oai_categories

They are using a Bamboo deployment plan.

1). Can you amend the 'upgrade.php' with create table functions for oai_education and oai_categories tables? (We will then be able to update our DB patches as attached in the SQL script accordingly and continue the DEV Xerte upgrade from 3.10 to 3.12). [I can email you the file our Apps Dev team sent me]

2). For Future - In order to reduce the time taken in translating the upgrade.php to SQL script patches, Is there a way we can directly apply the upgrade.php to our servers?

I can email you the full email they sent me and attachments off forum.

many thanks,
Alison

If you can use Lego, you can use Xerte

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
2 jaren 2 maanden geleden - 2 jaren 2 maanden geleden #9044 door tom
Oops. Thos tables are only created when oai-pmh harvesting is configured.

There should have been a check to see whther those tables do exist.

I fixed this in 3.12.30-6

You can patch upgrade.php in 2 ways:
1. Just remove or comment out the lines that at the parent_id to the two table in upgrade_36
2. Use the following instead of upgrade_36() and add function _table_exists:

[Code]

function upgrade_36(){
$table = table_by_key('oai_education');
$exists = _table_exists($table);
if ($exists) {
$ok = _upgrade_db_query("alter table $table add column parent_id int(11)");
$message = "Adding parent_id column to oai_education - ok ? " . ($ok ? 'true' : 'false') . "<br>";
}
$exists = _table_exists($table);
if ($exists) {
$table = table_by_key('oai_categories');
$ok = _upgrade_db_query("alter table $table add column parent_id int(11)");
$message .= "Adding parent_id column to oai_categories - ok ? " . ($ok ? 'true' : 'false') . "<br>";
}
$table = table_by_key('educationlevel');
$ok = _upgrade_db_query("alter table $table add column parent_id int(11)");
$message .= "Adding parent_id column to educationlevel - ok ? " . ($ok ? 'true' : 'false') . "<br>";
$table = table_by_key('syndicationcategories');
$ok = _upgrade_db_query("alter table $table add column parent_id int(11)");
$message .= "Adding parent_id column to syndicationcategories - ok ? " . ($ok ? 'true' : 'false') . "<br>";
return $message;
}

function _table_exists($table) {
$sql = "select 1 from $table limit 1";
$r = db_query($sql);
return $r!==false;
}

[\Code]
Laatst bewerkt 2 jaren 2 maanden geleden door tom.
De volgende gebruiker (s) zei dank u: a511197

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • a511197
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
2 jaren 2 maanden geleden #9051 door a511197
Beantwoord door a511197 in topic Missing tables whilst trying to upgrade to v3.12.29
Many thanks Tom,
Didn't see your response until this morning. I'll pass that onto our software app team.
Alison

If you can use Lego, you can use Xerte

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Tijd voor maken pagina: 0.139 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo