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