--- trunk/bin/BackupPC_updatedb 2005/10/12 11:15:19 183 +++ trunk/bin/BackupPC_updatedb 2005/11/10 15:07:10 235 @@ -143,7 +143,7 @@ my $where = ''; my @data; - if ($host_id && $share_id && $num) { + if (defined($host_id) && defined($share_id) && defined($num)) { $where = qq{ WHERE hosts.id = ? AND @@ -310,6 +310,7 @@ size bigint not null, inc_size bigint not null default -1, inc_deleted boolean default false, + parts integer not null default 1, PRIMARY KEY(id) ); @@ -342,11 +343,24 @@ ); create table archive_burned ( - archive_id int references archive(id), - date date default now(), - iso_size int default -1 + archive_id int references archive(id), + date timestamp default now(), + part int not null default 1, + copy int not null default 1, + iso_size bigint default -1 ); + create table backup_parts ( + id serial, + backup_id int references backups(id), + part_nr int not null check (part_nr > 0), + tar_size bigint not null check (tar_size > 0), + size bigint not null check (size > 0), + md5 text not null, + items int not null check (items > 0), + date timestamp default now(), + primary key(id) + ); }); print "creating indexes: "; @@ -365,6 +379,7 @@ files:size archive:dvd_nr archive_burned:archive_id + backup_parts:backup_id,part_nr )) { do_index($index); }