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

Diff of /trunk/bin/BackupPC_updatedb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by dpavlin, Sat Aug 20 16:40:11 2005 UTC revision 52 by dpavlin, Sat Aug 20 16:45:02 2005 UTC
# Line 65  if ($opt{c}) { Line 65  if ($opt{c}) {
65                  my $index = shift || return;                  my $index = shift || return;
66                  my ($table,$col,$unique) = split(/_/, $index);                  my ($table,$col,$unique) = split(/_/, $index);
67                  $unique ||= '';                  $unique ||= '';
68                    $index =~ s/,/_/g;
69                  $dbh->do(qq{ create $unique index $index on $table($col) });                  $dbh->do(qq{ create $unique index $index on $table($col) });
70          }          }
71    
# Line 98  if ($opt{c}) { Line 99  if ($opt{c}) {
99                  );                              );            
100          });          });
101    
102          do_index('backups_num_unique');          do_index('backups_hostid,num_unique');
103    
104          $dbh->do(qq{          $dbh->do(qq{
105                  create table dvds (                  create table dvds (
# Line 113  if ($opt{c}) { Line 114  if ($opt{c}) {
114                  create table files (                  create table files (
115                          ID      SERIAL          PRIMARY KEY,                            ID      SERIAL          PRIMARY KEY,  
116                          shareID INTEGER         NOT NULL references shares(id),                          shareID INTEGER         NOT NULL references shares(id),
117                          backupNum  INTEGER      NOT NULL references backups(num),                          backupNum  INTEGER      NOT NULL,
118                          name       VARCHAR(255) NOT NULL,                          name       VARCHAR(255) NOT NULL,
119                          path       VARCHAR(255) NOT NULL,                          path       VARCHAR(255) NOT NULL,
120                          fullpath   VARCHAR(255) NOT NULL,                          fullpath   VARCHAR(255) NOT NULL,

Legend:
Removed from v.51  
changed lines
  Added in v.52

  ViewVC Help
Powered by ViewVC 1.1.26