IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21007


Ignore:
Timestamp:
Dec 15, 2008, 4:09:59 PM (17 years ago)
Author:
bills
Message:

need to set diffSkyfile.skkcell_id when converting to new schema

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/collapse_diffinputs.pl

    r20994 r21007  
    3434    stack1,
    3535    warp2,
    36     stack2
     36    stack2,
     37    skycell_id
    3738    FROM
    3839        (select
    3940            diff_id,
    4041            warp1 as warp1,
    41             stack2 as stack1
     42            stack2 as stack1,
     43            skycell_id as skycell_id
    4244        from diffInputSkyfile
    4345        WHERE template = 0
     
    4749            diff_id,
    4850            warp1 as warp2,
    49             stack2 as stack2
     51            stack2 as stack2,
     52            skycell_id as stack_skycell
    5053        from diffInputSkyfile
    5154        WHERE template = 1
     
    6871    my $stack1 = $ref->{stack1};
    6972    my $stack2 = $ref->{stack2};
     73    my $skycell_id = $ref->{skycell_id};
    7074
    7175    # reorganizing columns puts warp1 and stack 1 correctly for template.
     
    8791        die "unexpected input set for $diff_id";
    8892    }
     93
     94    # set skycell_id in any existing diffSkyfile
     95    $dbh->do("UPDATE diffSkyfile set skycell_id = ? where diff_id = ?", undef, $skycell_id, $diff_id);
    8996
    9097    #
Note: See TracChangeset for help on using the changeset viewer.