Changeset 772 for trunk/cgi-bin
- Timestamp:
- 09/01/15 16:39:49 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/db-update.pl
r761 r772 29 29 # master blocks move to the allocations table 30 30 my $getm = $dbh->prepare("SELECT cidr,ctime,mtime,rwhois FROM masterblocks"); 31 my $insm = $dbh->prepare("INSERT INTO allocations (cidr,type,createstamp,modifystamp,swip ) VALUES (?,'mm',?,?,?)");31 my $insm = $dbh->prepare("INSERT INTO allocations (cidr,type,createstamp,modifystamp,swip,custid) VALUES (?,'mm',?,?,?,?)"); 32 32 33 33 # routed blocks move to the allocations table 34 34 my $getr = $dbh->prepare("SELECT cidr,city FROM routed WHERE cidr <<= ?"); 35 my $insr = $dbh->prepare("INSERT INTO allocations (cidr,type,city,parent_id ) VALUES (?,'rm',?,?)");35 my $insr = $dbh->prepare("INSERT INTO allocations (cidr,type,city,parent_id,custid) VALUES (?,'rm',?,?,?)"); 36 36 my $rfree = $dbh->prepare("UPDATE freeblocks SET parent_id = ?, routed='m' WHERE cidr <<= ? AND routed='y'"); 37 37 … … 68 68 print "$master\t"; 69 69 # copy master to allocations table 70 $insm->execute($master, $mctime, $mmtime, $mswip );70 $insm->execute($master, $mctime, $mmtime, $mswip, $def_custids{'mm'}); 71 71 $get_id->execute; 72 72 my ($mid) = $get_id->fetchrow_array(); … … 79 79 print " $routed\t"; 80 80 # copy routed to allocations table 81 $insr->execute($routed, $rcity, $mid );81 $insr->execute($routed, $rcity, $mid, $def_custids{'rm'}); 82 82 $get_id->execute; 83 83 my ($rid) = $get_id->fetchrow_array();
Note:
See TracChangeset
for help on using the changeset viewer.