FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Migrate DB from release 3.7.0 to 3.8.0. More...
Go to the source code of this file.
Functions | |
calculateNumberOfRecordsToRecode ($dbManager) | |
updateRecodedValues ($dbManager, $table, $rows) | |
recodeContents (&$rows, $MODDIR) | |
startRecodingTables ($dbManager, $MODDIR) | |
getDbEncoding ($dbManager) | |
updateDbEncoding ($dbManager) | |
checkMigrate3738Required ($dbManager) | |
recodeTables ($dbManager, $MODDIR, $force=false) | |
Migrate_37_38 ($dbManager, $MODDIR) | |
Variables | |
const | MAX_ROW_SIZE = 100 |
const | ENCODE_TABLES |
Migrate DB from release 3.7.0 to 3.8.0.
Definition in file dbmigrate_3.7-3.8.php.
calculateNumberOfRecordsToRecode | ( | $dbManager | ) |
Calculate the total number of records in concerned tables
DbManager | $dbManager |
Definition at line 37 of file dbmigrate_3.7-3.8.php.
checkMigrate3738Required | ( | $dbManager | ) |
Check if migration is required.
DbManager | $dbManager |
Definition at line 237 of file dbmigrate_3.7-3.8.php.
getDbEncoding | ( | $dbManager | ) |
Get fossology DB's encoding
DbManager | $dbManager |
Definition at line 207 of file dbmigrate_3.7-3.8.php.
Migrate_37_38 | ( | $dbManager, | |
$MODDIR | |||
) |
Migration from FOSSology 3.7.0 to 3.8.0
DbManager | $dbManager |
Definition at line 322 of file dbmigrate_3.7-3.8.php.
recodeContents | ( | & | $rows, |
$MODDIR | |||
) |
Use the recoder tool to remove non UTF-8 characters from text
[in,out] | array | $rows | Rows with ID and content. Function will replace the content with recoded values and remove the rows which are unchanged. |
string | $MODDIR | Location of fossology mods |
Definition at line 90 of file dbmigrate_3.7-3.8.php.
recodeTables | ( | $dbManager, | |
$MODDIR, | |||
$force = false |
|||
) |
Start the recoding process
DbManager | $dbManager | |
string | $MODDIR | Location of LIB |
boolean | $force | True to force the process |
Definition at line 268 of file dbmigrate_3.7-3.8.php.
startRecodingTables | ( | $dbManager, | |
$MODDIR | |||
) |
Fetch the data from tables and update the recoded values
DbManager | $dbManager |
Definition at line 148 of file dbmigrate_3.7-3.8.php.
updateDbEncoding | ( | $dbManager | ) |
Check if the DB encoding is SQL_ASCII, change it to UTF-8
DbManager | $dbManager |
Definition at line 220 of file dbmigrate_3.7-3.8.php.
updateRecodedValues | ( | $dbManager, | |
$table, | |||
$rows | |||
) |
Update the recoded values back into DB
DbManager | $dbManager | |
string | $table | Table to be updated |
array | $rows | Rows with ID and recoded values |
Definition at line 58 of file dbmigrate_3.7-3.8.php.
array ENCODE_TABLES |
Tables which needs to be recoded
Definition at line 26 of file dbmigrate_3.7-3.8.php.
integer MAX_ROW_SIZE = 100 |
Maximum rows to process at once
Definition at line 20 of file dbmigrate_3.7-3.8.php.