FOSSology  4.4.0
Open Source License Compliance by Open Source Software
dbmigrate_3.6-3.7.php File Reference

Migrate DB from release 3.6.0 to 3.7.0 with new obligation fixes. More...

Go to the source code of this file.

Functions

 moveCandidateLicenseMap ($dbManager, $obPk, $verbose)
 Move licenses from obligation map to obligation candidate map. More...
 
 checkMigrate3637Required ($dbManager)
 
 getLicConObligationMigrate ($dbManager)
 
 moveObligation ($dbManager, $verbose)
 Get all obligations and move licenses. More...
 
 migrateReuseValueForEnhanceWithMainLicense ($dbManager)
 
 removeNonConcLicensesFromObligation ($dbManager, $migrationData)
 Remove identified licenses from obligations. More...
 
 Migrate_36_37 ($dbManager, $verbose)
 

Detailed Description

Migrate DB from release 3.6.0 to 3.7.0 with new obligation fixes.

Definition in file dbmigrate_3.6-3.7.php.

Function Documentation

◆ checkMigrate3637Required()

checkMigrate3637Required (   $dbManager)

Check if migration is required.

Parameters
DbManager$dbManager
Returns
boolean True if migration is required, false otherwise

Definition at line 70 of file dbmigrate_3.6-3.7.php.

◆ getLicConObligationMigrate()

getLicConObligationMigrate (   $dbManager)

Get the entries for which migration is required for non concluded licenses.

Parameters
DbManager$dbManager
Returns
array Entries from which require migration

Definition at line 107 of file dbmigrate_3.6-3.7.php.

◆ Migrate_36_37()

Migrate_36_37 (   $dbManager,
  $verbose 
)

Migration from FOSSology 3.6.0 to 3.7.0

Parameters
DbManager$dbManager
boolean$verbose

Definition at line 229 of file dbmigrate_3.6-3.7.php.

◆ migrateReuseValueForEnhanceWithMainLicense()

migrateReuseValueForEnhanceWithMainLicense (   $dbManager)

Check if Reuse value needs to be changed.

Parameters
DbManager$dbManager
Returns
boolean True value 8 exist, false otherwise

Definition at line 155 of file dbmigrate_3.6-3.7.php.

◆ moveCandidateLicenseMap()

moveCandidateLicenseMap (   $dbManager,
  $obPk,
  $verbose 
)

Move licenses from obligation map to obligation candidate map.

Remove licenses from obligation_map which are candidate license and add them to obligation_candidate_map.

Parameters
DbManager$dbManagerDB Manager to use
integer$obPkObligation ID
boolean$verboseSet TRUE to print verbose message
Returns
integer Number of entries deleted

Definition at line 28 of file dbmigrate_3.6-3.7.php.

◆ moveObligation()

moveObligation (   $dbManager,
  $verbose 
)

Get all obligations and move licenses.

Parameters
DbManager$dbManager
boolean$verbose

Definition at line 136 of file dbmigrate_3.6-3.7.php.

◆ removeNonConcLicensesFromObligation()

removeNonConcLicensesFromObligation (   $dbManager,
  $migrationData 
)

Remove identified licenses from obligations.

The function removes the obligation map sent from $migrationData. To do so, the function first gets the list of licenses along with their parent license. Then makes sure that the parent is part of the obligation to prevent data loss. Then it finally removes the obligation map.

Parameters
DbManager$dbManager
array$migrationData

Definition at line 191 of file dbmigrate_3.6-3.7.php.