summaryrefslogtreecommitdiff
path: root/bucky2/bin/fix-files
diff options
context:
space:
mode:
Diffstat (limited to 'bucky2/bin/fix-files')
-rw-r--r--bucky2/bin/fix-files8
1 files changed, 3 insertions, 5 deletions
diff --git a/bucky2/bin/fix-files b/bucky2/bin/fix-files
index 3ef693a..080ef78 100644
--- a/bucky2/bin/fix-files
+++ b/bucky2/bin/fix-files
@@ -4,7 +4,7 @@ use lib "../lib";
use Bucky;
my $bucky = new Bucky;
-my $file_list = $bucky->db->select("file", {'thread = 2833 AND id > 16186 LIMIT 20'});
+my $file_list = $bucky->db->select("file", {'thread = 2833 AND id > 16186'});
my $file_map = {};
foreach my $f (@$file_list) {
$file_map->{ $f->{'filename'} } = $f->{'id'};
@@ -31,10 +31,8 @@ foreach my $thread_id (@dirs) {
my $file_id = $file_map->{$filename};
- $bucky->db->update('file', {
- "criteria" => {
- "id" => $file_id
- },
+ $bucky->db->update_by_id('file', {
+ "id" => $file_id,
"record" => {
"thread" => $thread_id
}