From c44d800333e2e407d2983695879d89979e3527b7 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Tue, 8 Aug 2023 20:05:42 +0200 Subject: [PATCH] Fixing offset. --- lib/BurguillosInfo/DB/Migrations.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/BurguillosInfo/DB/Migrations.pm b/lib/BurguillosInfo/DB/Migrations.pm index ef5948b..05e9006 100644 --- a/lib/BurguillosInfo/DB/Migrations.pm +++ b/lib/BurguillosInfo/DB/Migrations.pm @@ -50,12 +50,12 @@ sub _populate_locations ($dbh) { my $tracking = BurguillosInfo::Tracking->new( BurguillosInfo->new ); my $page = 0; while (1) { - my $data = $dbh->selectall_arrayref( <<'EOF', { Slice => {} }, $page ); + my $data = $dbh->selectall_arrayref( <<"EOF", { Slice => {} }, $page ); SELECT uuid, remote_address FROM requests WHERE date > NOW() - interval '2 months' LIMIT 100 -OFSSET ?; +OFSSET $page; EOF if (!@$data) { return;