1 drop table backup_parts;
3 create table backup_parts (
5 backup_id int references backups(id),
6 part_nr int not null check (part_nr > 0),
7 tar_size bigint not null check (tar_size > 0),
8 size bigint not null check (size > 0),
10 items int not null check (items > 0),
11 date timestamp default now(),
15 -- ensure that backup part has unique numbers
16 create unique index backup_part_nr on backup_parts(backup_id,part_nr);