Bug 14570: (follow-up) fix table name in j2a.pl
authorAgustin Moyano <agustinmoyano@theke.io>
Sat, 18 May 2019 00:10:02 +0000 (21:10 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 20 Aug 2019 15:05:08 +0000 (16:05 +0100)
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

misc/cronjobs/j2a.pl

index a63666b..73cd963 100755 (executable)
@@ -187,8 +187,8 @@ if ( not $noaction ) {
         $schema->storage->txn_begin;
 
         my $query = qq|
-            DELETE relationships FROM relationships
-            LEFT JOIN borrowers ON ( borrowers.borrowernumber = relationships.guarantee_id )
+            DELETE borrower_relationships FROM borrower_relationships
+            LEFT JOIN borrowers ON ( borrowers.borrowernumber = borrower_relationships.guarantee_id )
             $where
         |;
         my $sth = $dbh->prepare($query);
@@ -232,8 +232,8 @@ if ( not $noaction ) {
         |;
 
         my $query = qq|
-            DELETE relationships FROM relationships
-            LEFT JOIN borrowers ON ( borrowers.borrowernumber = relationships.guarantee_id )
+            DELETE borrower_relationships FROM borrower_relationships
+            LEFT JOIN borrowers ON ( borrowers.borrowernumber = borrower_relationships.guarantee_id )
             $where
         |;
         my $sth = $dbh->prepare($query);