/[BackupPC]/trunk/sql/08_files_fk_backups.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

Contents of /trunk/sql/08_files_fk_backups.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 277 - (show annotations)
Tue Dec 13 22:59:54 2005 UTC (18 years, 5 months ago) by dpavlin
File size: 335 byte(s)
cleanup files and add foreign key

1 create index files_backupnum on files(backupnum) ;
2
3 -- cleanup, just in case
4 delete from files where (shareid,backupnum) not in (select shareid,num from backups) ;
5
6 create unique index backups_share_num on backups(shareid,num) ;
7 alter table files add foreign key (shareid,backupnum) references backups(shareid,num) on delete cascade;
8

  ViewVC Help
Powered by ViewVC 1.1.26