first commit
This commit is contained in:
30
upgrade/list/upgrade.2010-12-04.php
Normal file
30
upgrade/list/upgrade.2010-12-04.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
class Upgrade6 extends UpgradeNew
|
||||
{
|
||||
// overi, jestli je opravnene provest upgrade
|
||||
public function checkRightfulness_1()
|
||||
{
|
||||
$change = true;
|
||||
|
||||
$SQL = sqlQuery('SHOW FIELDS FROM '.getTableName('order_items'));
|
||||
while ($row = sqlFetchArray($SQL)) {
|
||||
if ($row['Field'] == 'note') {
|
||||
$change = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $change;
|
||||
}
|
||||
|
||||
// provest samotny upgrade
|
||||
public function makeChanges_1()
|
||||
{
|
||||
sqlQuery('ALTER TABLE '.getTableName('order_items')." ADD note TINYTEXT NOT NULL DEFAULT '' AFTER date;");
|
||||
|
||||
sqlQuery('ALTER TABLE '.getTableName('cart')." ADD note TINYTEXT NOT NULL DEFAULT '' AFTER date;");
|
||||
|
||||
$this->upgradeOK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user