Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Questions on getting Xerte Toolkits installed on your server and questions about authentication and user logins.
  • Page:
  • 1

TOPIC:

Missing tables whilst trying to upgrade to v3.12.29 6 months 2 weeks ago #9043

  • A511197
  • A511197's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 133
  • Thank you received: 10
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).

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

Please Inloggen or Create an account to join the conversation.

Missing tables whilst trying to upgrade to v3.12.29 6 months 2 weeks ago #9044

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1286
  • Thank you received: 324
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]
The following user(s) said Thank You: A511197

Please Inloggen or Create an account to join the conversation.

Last edit: by tom.

Missing tables whilst trying to upgrade to v3.12.29 6 months 4 days ago #9051

  • A511197
  • A511197's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 133
  • Thank you received: 10
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

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.051 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search