-- this snippet will erase all DVD media after 13th one!

begin ;

select id,dvd_nr,total_size,username from archive order by dvd_nr;

delete from archive where dvd_nr > 13 ;

select id,dvd_nr,total_size,username from archive order by dvd_nr;

select setval('dvd_nr', (select max(dvd_nr) from archive)) ;

