IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.