first commit
This commit is contained in:
28
upgrade/list/upgrade.2009-09-15.php
Normal file
28
upgrade/list/upgrade.2009-09-15.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class Upgrade4 extends UpgradeNew
|
||||
{
|
||||
// overi, jestli je opravnene provest upgrade
|
||||
public function checkRightfulness_1()
|
||||
{
|
||||
$change = true;
|
||||
|
||||
$SQL = sqlQuery('SHOW FIELDS FROM '.getTableName('products'));
|
||||
while ($row = sqlFetchArray($SQL)) {
|
||||
if ($row['Field'] == 'show_raw_price') {
|
||||
$change = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $change;
|
||||
}
|
||||
|
||||
// provest samotny upgrade
|
||||
public function makeChanges_1()
|
||||
{
|
||||
sqlQuery('ALTER TABLE '.getTableName('products')." ADD `show_raw_price` ENUM( 'Y', 'N' ) NOT NULL DEFAULT 'N', ADD `tollfree` ENUM( 'Y', 'N' ) NOT NULL DEFAULT 'N';");
|
||||
|
||||
$this->upgradeOK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user