IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21033


Ignore:
Timestamp:
Dec 17, 2008, 3:26:17 PM (17 years ago)
Author:
Paul Price
Message:

Attempt to fix following schema change.

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diff_inputs.pl

    r20461 r21033  
    2626
    2727my ($db_host, $db_name, $db_user, $db_pw); # Database details
    28 my ($diff_id);                  # Diff of interest
     28my ($diff_id, $skycell_id);     # Diff and skycell of interest
    2929my ($input);                    # Input list
    3030
     
    3535           'dbpass=s' => \$db_pw, # Database p/w
    3636           'diff_id=s' => \$diff_id, # Diff identifier
     37           'skycell_id=s' => \$skycell_id, # Skycell identifier
    3738           'input=s'  => \$input, # Input list to generate
    3839           ) or die "Unable to parse arguments.\n";
     
    5758    "     NULL AS stack_path_base" .
    5859    " FROM diffRun" .
    59     " JOIN diffInputSkyfile USING(diff_id, skycell_id)" .
     60    " JOIN diffInputSkyfile USING(diff_id)" .
    6061    " JOIN warpSkyfile USING(warp_id, skycell_id)" .
    61     " WHERE diff_id = $diff_id" .
    62     " UNION" .
     62    " WHERE diff_id = $diff_id";
     63$sql .= " AND skycell_id = $skycell_id" if defined $skycell_id;
     64$sql.= " UNION" .
    6365    " SELECT" .
    6466    "     NULL AS warp_path_base," .
    6567    "     stackSumSkyfile.path_base AS stack_path_base" .
    6668    " FROM diffRun" .
    67     " JOIN diffInputSkyfile USING(diff_id, skycell_id)" .
     69    " JOIN diffInputSkyfile USING(diff_id)" .
    6870    " JOIN stackSumSkyfile USING(stack_id)" .
    6971    " WHERE diff_id = $diff_id";
     72$sql .= " AND skycell_id = $skycell_id" if defined $skycell_id;
    7073
    7174
  • trunk/tools/diff_outputs.pl

    r20811 r21033  
    2121
    2222my ($db_host, $db_name, $db_user, $db_pw); # Database details
    23 my ($diff_id);                  # Diff of interest
     23my ($diff_id, $skycell_id);     # Diff and skycell of interest
    2424my ($input);                    # Input list
    2525my ($products);                 # Products of interest
     
    3131           'dbpass=s' => \$db_pw, # Database p/w
    3232           'diff_id=s' => \$diff_id, # Diff identifier
     33           'skycell_id=s' => \$skycell_id, # Skycell identifier
    3334           'products=s' => \$products, # Products of interest
    3435           ) or die "Unable to parse arguments.\n";
     
    5051# Query to run
    5152my $sql = "SELECT path_base FROM diffSkyfile WHERE diff_id = $diff_id";
     53$sql .= " AND skycell_id = $skycell_id" if defined $skycell_id;
    5254
    5355# List of diffs
Note: See TracChangeset for help on using the changeset viewer.