Location: PHPKode > projects > Esvon Personals > esvon-personals/upgrades/v4_to_v4_09/upgrade404-405.php
<?php

// File to upgrade Esvon Classifieds from 4.0.4 to 4.0.5
// After use this, you can delete it

//*********************************************

define('DB_UPGRADE', 1);

if(!defined('SITE_PATH')){
  if(!file_exists('./inc/application.php')) die("File Not Found: application.php");
  require_once './inc/application.php';
}

if(hwModGetState('Reviews')){
  mysql_query("ALTER TABLE ".hwModTable('Reviews','data')." ADD caption varchar(255) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Reviews','data')." ADD images text NOT NULL");
}

if(hwModGetState('Affiliates')){
  mysql_query("ALTER TABLE ".hwModTable('Affiliates','user')." ADD coupon varchar(255) NOT NULL");
  mysql_query("ALTER TABLE ".hwModTable('Affiliates','user')." ADD KEY coupon (coupon)");
  mysql_query("ALTER TABLE ".hwModTable('Affiliates','user')." ADD coupon_exp datetime NOT NULL");
}

if(hwModGetState('Auction')){
  mysql_query("ALTER TABLE ".TBL_AD." ADD hw_auct_buy_price decimal(9,2) unsigned NOT NULL");
}

if(hwModGetState('Coupons')){
  //mysql_query('TRUNCATE '.hwModTable('Coupons','track'));
  mysql_query('ALTER TABLE '.hwModTable('Coupons','track').' MODIFY cp_id varchar(255) NOT NULL');
}

echo 'Esvon Classifieds Tables Updated, Ok.. ('.basename(__FILE__).')';

?>
Return current item: Esvon Personals