You are here:  » Upgrade tips?


Upgrade tips?

Submitted by marco@flapper on Tue, 2016-09-20 08:53 in

Hi,
I need to upgrade as my servers gets an php/mysql upgrade. I have a multisite wordpress site with multiple pt instances (in subdirectories). The plugin is on 2.0 and I think the PT installs are still a modified 13/03 version.

I have modified a standalone pt version 15.09 and was thinking about installing that on a new subdirectory and testing it out by just swapping the settings in wp-admin for PriceTapestry.org. So I can work on adding any custom changes we made in the past and testing it and still be able to swap back to original old version.

I also remembered you did some changes in a dbmod.php and an database_tool.php to accomodate additional fields and additional index fields.

My questions are:
1. Will my upgrade methode work or do you have any better ideas?
2. Can I still use those dbmod.php and the database_tool.php or should they be modified?

Submitted by support on Tue, 2016-09-20 10:32

Hello Marco,

That sounds fine - Backup and Restore in 15/09A is fully backwards compatible with a Backup___.xml file created by 13/ distribution. dbmod.php files are application specific so any database mods that you have made to the 13/ installation that you wish to replicate into 15/09 would have to be run again.

If you have added a number of custom fields, first add the appropriate entries for the custom fields in the $config_fieldSet array in config.advanced.php, and then run the following dbmodall.php which will create the custom fields on the `feeds` and `products` tables in one go without having to run individual dbmod.php scripts for each field...

<?php
  
require("includes/common.php");
  
$config_databaseDebugMode FALSE;
  
$ignore = array("name","description","image_url","buy_url","price","category","brand");
  foreach(
$config_fieldSet as $field => $v)
  {
    if (
in_array($field,$ignore)) continue;
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."feeds`
              ADD `field_"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
    
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
              ADD `"
.$field."` VARCHAR(255) NOT NULL";
    
database_queryModify($sql,$result);
  }
  print 
"Done.";
?>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Wed, 2016-09-21 13:18

Is it possible search also has to be modified too? I don't get any search results. Not in the plugin and not in the pricetapestry page.

Submitted by support on Wed, 2016-09-21 15:20

Hi Marco,

Ah - it sounds like the database schema of the earlier distribution is still in place, so that will need to be upgraded. Please can you email me and I'll reply with the necessary dbmod scripts to complete the upgrade...

Cheers,
David.
--
PriceTapestry.com