/[BackupPC]/trunk/sql/zz_archive_delete_pending.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/sql/zz_archive_delete_pending.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (hide annotations)
Tue Dec 13 19:41:34 2005 UTC (18 years, 5 months ago) by dpavlin
File size: 306 byte(s)
fix pending media created by test cases

1 dpavlin 273 -- this snippet will erase all DVD media after 13th one!
2    
3     begin ;
4    
5     select id,dvd_nr,total_size,username from archive order by dvd_nr;
6    
7     delete from archive where dvd_nr > 13 ;
8    
9     select id,dvd_nr,total_size,username from archive order by dvd_nr;
10    
11     select setval('dvd_nr', (select max(dvd_nr) from archive)) ;
12    

  ViewVC Help
Powered by ViewVC 1.1.26