23 $AllPossibleOpts =
"abc:d:ef:ghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
27 $DatabaseName =
"fossology";
28 $UpdateLiceneseRef =
false;
32 $SchemaFilePath =
"$MODDIR/www/ui/core-schema.dat";
35 $Options = getopt($AllPossibleOpts);
36 foreach ($Options as $Option => $OptVal) {
41 $DatabaseName = $OptVal;
44 $SchemaFilePath = $OptVal;
50 echo
"Invalid Option \"$Option\".\n";
58 $usage =
"Usage: " . basename($argv[0]) .
" [options]
59 Update FOSSology database. Options are:
60 -d {database name} default is 'fossology'
65 if (file_exists($SchemaFilePath) && !@unlink($SchemaFilePath)) {
66 $FailMsg =
"Existing schema data file ($SchemaFilePath) could not be removed.";
71 if ($FailMsg !==
false) {
72 print
"ERROR: $FailMsg \n";
ExportSchema($filename=NULL)
Export the schema of the connected ($PG_CONN) database to a file in the format readable by GetSchema(...