FOSSology  4.4.0
Open Source License Compliance by Open Source Software
dbmigrate_3.3-3.4.php File Reference

Migrate DB from release 3.3.0 to 3.4.0 with new constraints. More...

Go to the source code of this file.

Functions

 cleanTableForeign ($dbManager, $tableToClean, $foreignKey, $referenceTable, $referenceKey, $dryRun)
 Delete all rows from the table which does not have reference. More...
 
 cleanWithUnique ($dbManager, $tableName, $primaryKey, $columnNames, $dryRun)
 Remove redundant rows based on values in columnNames. More...
 
 Migrate_33_34 ($dbManager, $dryRun)
 

Detailed Description

Migrate DB from release 3.3.0 to 3.4.0 with new constraints.

Definition in file dbmigrate_3.3-3.4.php.

Function Documentation

◆ cleanTableForeign()

cleanTableForeign (   $dbManager,
  $tableToClean,
  $foreignKey,
  $referenceTable,
  $referenceKey,
  $dryRun 
)

Delete all rows from the table which does not have reference.

For foreign key constraints.

Parameters
DbManager$dbManagerDB Manager to use
string$tableToCleanDirty table
string$foreignKeyForeign key of dirty table
string$referenceTableTable to be referenced
string$referenceKeyReference key of referenced table
boolean$dryRunSet TRUE to make a dry run
Returns
integer Number of entries deleted

Definition at line 26 of file dbmigrate_3.3-3.4.php.

◆ cleanWithUnique()

cleanWithUnique (   $dbManager,
  $tableName,
  $primaryKey,
  $columnNames,
  $dryRun 
)

Remove redundant rows based on values in columnNames.

For unique constraints.

Parameters
DbManager$dbManager
string$tableName
string$primaryKey
string[]$columnNames
boolean$dryRun
Returns
integer Number of entries deleted

Definition at line 73 of file dbmigrate_3.3-3.4.php.

◆ Migrate_33_34()

Migrate_33_34 (   $dbManager,
  $dryRun 
)

Migration from FOSSology 3.3.0 to 3.4.0

Parameters
DbManager$dbManager
boolean$dryRun

Definition at line 125 of file dbmigrate_3.3-3.4.php.