Skip to content

Commit

Permalink
Merge pull request oxwall#586 from oxwall/issue_1446
Browse files Browse the repository at this point in the history
fix update 10815
  • Loading branch information
azazel9966 authored Dec 5, 2018
2 parents 4384ae7 + 856251e commit 3e694c0
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions ow_updates/updates/10815/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@
$dbPrefix = OW_DB_PREFIX;
$dbo = Updater::getDbo();

$sql = "ALTER TABLE `{$dbPrefix}base_question_value` CHANGE `value` `value` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';";
$sql = "ALTER TABLE `{$dbPrefix}base_question_data` CHANGE `intValue` `intValue` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';";
$sql = [
"ALTER TABLE `{$dbPrefix}base_question_value` CHANGE `value` `value` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';",
"ALTER TABLE `{$dbPrefix}base_question_data` CHANGE `intValue` `intValue` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';"
];


try
{
$dbo->query($sql);
}
catch (Exception $e)
foreach ( $sql as $query )
{
$logger = OW::getLogger();
$logger->addEntry($e->getMessage());
$logger->writeLog();
try
{
$dbo->query($query);
}
catch ( Exception $e )
{
$logger = OW::getLogger();
$logger->addEntry($e->getMessage());
$logger->writeLog();
}
}

0 comments on commit 3e694c0

Please sign in to comment.