IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23893


Ignore:
Timestamp:
Apr 16, 2009, 5:44:28 PM (17 years ago)
Author:
Paul Price
Message:

Add UNIQUE constraint to ensure we're not downloading the same file/fileset over and over.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    r23885 r23893  
    10391039    source VARCHAR(128) NOT NULL, -- source URI
    10401040    product VARCHAR(64) NOT NULL, -- product of interest
    1041     workdir VARCHAR(255),       -- where to extract (optional)
     1041    workdir VARCHAR(255) NOT NULL, -- where to extract
    10421042    comment VARCHAR(255),       -- for human memory
    10431043    fileset_last VARCHAR(128),  -- last fileset seen
     
    10551055    PRIMARY KEY(fileset_id),
    10561056    KEY(source_id),
     1057    CONSTRAINT UNIQUE(source_id, fileset),
    10571058    FOREIGN KEY(source_id) REFERENCES receiveSource(source_id)
    10581059) ENGINE=innodb DEFAULT CHARSET=latin1;
     
    10651066    PRIMARY KEY(file_id),
    10661067    KEY(fileset_id),
     1068    CONSTRAINT UNIQUE(fileset_id, file),
    10671069    FOREIGN KEY(fileset_id) REFERENCES receiveFileset(fileset_id)
    10681070) ENGINE=innodb DEFAULT CHARSET=latin1;
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r23885 r23893  
    13081308    source VARCHAR(128) NOT NULL, -- source URI
    13091309    product VARCHAR(64) NOT NULL, -- product of interest
    1310     workdir VARCHAR(255),       -- where to extract (optional)
     1310    workdir VARCHAR(255) NOT NULL, -- where to extract
    13111311    comment VARCHAR(255),       -- for human memory
    13121312    fileset_last VARCHAR(128),  -- last fileset seen
     
    13241324    PRIMARY KEY(fileset_id),
    13251325    KEY(source_id),
     1326    CONSTRAINT UNIQUE(source_id, fileset),
    13261327    FOREIGN KEY(source_id) REFERENCES receiveSource(source_id)
    13271328) ENGINE=innodb DEFAULT CHARSET=latin1;
     
    13341335    PRIMARY KEY(file_id),
    13351336    KEY(fileset_id),
     1337    CONSTRAINT UNIQUE(fileset_id, file),
    13361338    FOREIGN KEY(fileset_id) REFERENCES receiveFileset(fileset_id)
    13371339) ENGINE=innodb DEFAULT CHARSET=latin1;
Note: See TracChangeset for help on using the changeset viewer.