Mercurial > hg > fapweb
diff managedb.php @ 1120:b2bca5f6d0ff default tip
Cosmetic cleanup: remove trailing whitespace.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 Dec 2020 13:47:13 +0200 |
parents | 24e6915fc0fb |
children |
line wrap: on
line diff
--- a/managedb.php Mon Oct 14 10:54:32 2019 +0300 +++ b/managedb.php Sun Dec 13 13:47:13 2020 +0200 @@ -144,7 +144,7 @@ } return $status; -} +} function stAddSettingsGroup($inDB, $outDB, $groups, $groupData, $groupTable, $table, $upgrade) @@ -157,7 +157,7 @@ echo "Group data not set for settings group ID '".$groupID."'.\n"; return FALSE; } - + // Add group, if needed echo " - Group '".$groupID."' -> ".$groupData[$groupID][1]."."; $sql = stDBPrepareSQL($outDB, @@ -169,7 +169,7 @@ echo "\nFailed to add group '".$groupID."'\n"; return FALSE; } - + // Add settings to the group stDBBeginTransaction($outDB); if (stDoAddSettings($inDB, $outDB, $settings, $table, $upgrade, $gid) === FALSE) @@ -260,7 +260,7 @@ $status = TRUE; $dbName = $outDB->getAttribute(PDO::ATTR_DRIVER_NAME); stDBBeginTransaction($outDB); - + foreach ($sqlTables as $table => $schema) { // Do not migrate excluded tables (or excluded tables with old names) @@ -282,7 +282,7 @@ // Convert to new schema, as needed $avals = array(); $acols = array(); - + foreach ($schema as $col) { // If input has schema column, add it to output @@ -393,7 +393,7 @@ echo "Invalid table definition '".$table."', table name must be lower case.\n"; $errors = TRUE; } - + foreach ($data as $def) if (strtolower($def[0]) != $def[0]) { @@ -432,7 +432,7 @@ stAddSettingsGroup($inDB, $inDB, $siteDefaultSettings, $siteSettingsGroups, "settings_groups", "settings", FALSE); stAddSettingsNormal($inDB, $inDB, $siteDisplayVars, "display_vars", FALSE, FALSE); } - + if ($addTestData) stAddTestData($inDB); @@ -479,7 +479,7 @@ echo "Using OUTPUT database spec '".$outSpec."'.\n"; // Possibly bail out incompatible upgrades here - + // Create tables if (!stCreateTables($outDB, TRUE)) exit; @@ -496,7 +496,7 @@ // Migrate other tables if (!stMigrateTables($inDB, $outDB, $upgrade, array("settings", "display_vars", "dbmeta", "settings_groups"))) exit; - + // Set new database version echo "Setting dbVersion.\n"; stSetDBMeta($outDB, "dbVersion", $dbVersion);