![]() |
FOSSology
4.7.1
Open Source License Compliance by Open Source Software
|
Retire deprecated license shortnames an agent may have re-created. More...
Go to the source code of this file.
Functions | |
| getLegacyLicenseNames () | |
| Deprecated shortname => current shortname. More... | |
| getLicenseRefReferences () | |
| Columns referencing license_ref.rf_pk, as table => column pairs. More... | |
| legacyLicenseWrite (DbManager $dbManager, $sql, $params, $statementName) | |
| Run a parameterised write; getSingleRow() would fetch a command result. More... | |
| renameOrMergeLicense (DbManager $dbManager, $old, $new, $verbose=false) | |
| Rename a license, or merge it away when the target already exists. More... | |
| Migrate_Legacy_License_Names (DbManager $dbManager, $verbose=false) | |
Retire deprecated license shortnames an agent may have re-created.
A shortname corrected by a release migration comes back whenever an agent still reports the old name: every scan after the upgrade inserts the deprecated row again. Release migrations are version gated and never run a second time, so that correction has to be repeated unconditionally.
For each pair the migration either renames the deprecated row, or – when both rows exist – moves every reference onto the current row and drops the deprecated one.
Definition in file dbmigrate_legacy-license-names.php.
| getLegacyLicenseNames | ( | ) |
Deprecated shortname => current shortname.
Definition at line 28 of file dbmigrate_legacy-license-names.php.
| getLicenseRefReferences | ( | ) |
Columns referencing license_ref.rf_pk, as table => column pairs.
Definition at line 40 of file dbmigrate_legacy-license-names.php.
| legacyLicenseWrite | ( | DbManager | $dbManager, |
| $sql, | |||
| $params, | |||
| $statementName | |||
| ) |
Run a parameterised write; getSingleRow() would fetch a command result.
| DbManager | $dbManager | |
| string | $sql | |
| array | $params | |
| string | $statementName |
Definition at line 67 of file dbmigrate_legacy-license-names.php.
| Migrate_Legacy_License_Names | ( | DbManager | $dbManager, |
$verbose = false |
|||
| ) |
| DbManager | $dbManager | |
| bool | $verbose |
Definition at line 129 of file dbmigrate_legacy-license-names.php.
| renameOrMergeLicense | ( | DbManager | $dbManager, |
| $old, | |||
| $new, | |||
$verbose = false |
|||
| ) |
Rename a license, or merge it away when the target already exists.
| DbManager | $dbManager | |
| string | $old | Deprecated shortname |
| string | $new | Current shortname |
| bool | $verbose |
Definition at line 82 of file dbmigrate_legacy-license-names.php.