added dvd_nr to archive_backup_parts
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 19:05:52 +0000 (20:05 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Jan 2011 19:05:52 +0000 (20:05 +0100)
bin/BackupPC_ASA_BurnArchiveMedia
bin/BackupPC_ASA_SearchUpdate
lib/BackupPC/CGI/BurnMedia.pm

index 24107cc..86f20e1 100755 (executable)
@@ -324,7 +324,7 @@ my $sth_archive_backup_parts = $dbh->prepare( qq{
                items,
                filename
        FROM archive_backup_parts
-       WHERE archive.dvd_nr = ?
+       WHERE dvd_nr = ?
        ORDER BY backup_id, part_nr
 });
 
@@ -530,7 +530,6 @@ print "Recoding finished, exiting...\n";
 $sth->finish;
 $sth_archive_backup_parts->finish;
 $sth_archive_burned->finish;
-$sth_archive_backup_check->finish;
 $sth_archive_burned->finish;
 
 $dbh->disconnect;
index 316b335..cb2dcd1 100755 (executable)
@@ -722,6 +722,7 @@ CREATE VIEW archive_backup_parts AS
 SELECT
        backup_parts.backup_id,
        archive_id,
+       dvd_nr,
        backup_part_id,
        hosts.name as host,
        shares.name as share,
index c24a530..6b2870b 100644 (file)
@@ -106,10 +106,9 @@ EOF
                                select
                                        filename,
                                        part_nr,
-                                       TIMESTAMP 'epoch' + a.date * INTERVAL '1 second' as date,
+                                       TIMESTAMP 'epoch' + date * INTERVAL '1 second' as date,
                                        size
-                               from archive_backup_parts a
-                               join archive on archive_id = archive.id
+                               from archive_backup_parts
                                where dvd_nr = ?
                                order by backup_part_id
                        });