--- trunk/bin/BackupPC_updatedb 2005/08/20 16:40:11 51 +++ trunk/bin/BackupPC_updatedb 2005/08/20 16:45:02 52 @@ -65,6 +65,7 @@ my $index = shift || return; my ($table,$col,$unique) = split(/_/, $index); $unique ||= ''; + $index =~ s/,/_/g; $dbh->do(qq{ create $unique index $index on $table($col) }); } @@ -98,7 +99,7 @@ ); }); - do_index('backups_num_unique'); + do_index('backups_hostid,num_unique'); $dbh->do(qq{ create table dvds ( @@ -113,7 +114,7 @@ create table files ( ID SERIAL PRIMARY KEY, shareID INTEGER NOT NULL references shares(id), - backupNum INTEGER NOT NULL references backups(num), + backupNum INTEGER NOT NULL, name VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, fullpath VARCHAR(255) NOT NULL,