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

Plus d'informations
il y a 2 ans 2 mois #9043 par 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

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 2 mois - il y a 2 ans 2 mois #9044 par 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]
Dernière édition: il y a 2 ans 2 mois par tom.
Les utilisateur(s) suivant ont remercié: a511197

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 2 mois #9051 par a511197
Réponse de a511197 sur le sujet 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

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.590 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo