Skip to content

Commit

Permalink
Working remote sucks
Browse files Browse the repository at this point in the history
  • Loading branch information
VaMaster committed Jan 25, 2019
1 parent 9caa229 commit 61989af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions php/webApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,17 +613,17 @@ function upgradeDbTable($config) {

if (count($addItems) || count($updateItems)) {
write_log("We've gotta add some stuff here.");
$query = "ALTER TABLE userdata" . PHP_EOL;
$query = "ALTER TABLE userdata ";
$items = [];
foreach ($addItems as $item => $type) {
$typeString = ucwords($type);
if (preg_match("/text/", $type)) $typeString = ucwords($type) . " CHARACTER SET latin1 COLLATE latin1_swedish_ci";
$typeString = strtoupper($type);
if (preg_match("/text/", $type)) $typeString = strtoupper($type) . " CHARACTER SET latin1 COLLATE latin1_swedish_ci";
if ($type === "bool") $typeString = "BOOLEAN";
$items[] = "ADD COLUMN $item $typeString NOT NULL";
}
foreach ($updateItems as $item => $type) {
$typeString = ucwords($type);
if (preg_match("/text/", $type)) $typeString = ucwords($type) . " CHARACTER SET latin1 COLLATE latin1_swedish_ci";
$typeString = strtoupper($type);
if (preg_match("/text/", $type)) $typeString = strtoupper($type) . " CHARACTER SET latin1 COLLATE latin1_swedish_ci";
if ($type === "bool") $typeString = "BOOLEAN";
$items[] = "CHANGE `$item` `$item` $typeString NOT NULL";
}
Expand Down

0 comments on commit 61989af

Please sign in to comment.