Lines 479-489
CREATE TABLE collections (
Link Here
|
479 |
colId integer(11) NOT NULL auto_increment, |
479 |
colId integer(11) NOT NULL auto_increment, |
480 |
colTitle varchar(100) NOT NULL DEFAULT '', |
480 |
colTitle varchar(100) NOT NULL DEFAULT '', |
481 |
colDesc text NOT NULL, |
481 |
colDesc text NOT NULL, |
482 |
colBranchcode varchar(4) DEFAULT NULL comment 'branchcode for branch where item should be held.', |
482 |
colBranchcode varchar(10) DEFAULT NULL comment 'branchcode for branch where item should be held.', |
483 |
PRIMARY KEY (colId) |
483 |
PRIMARY KEY (colId) |
484 |
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8; |
484 |
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8; |
485 |
|
485 |
|
486 |
-- |
486 |
-- |
|
|
487 |
-- Constraints for table `collections` |
488 |
-- |
489 |
ALTER TABLE `collections` |
490 |
ADD CONSTRAINT `collections_ibfk_1` FOREIGN KEY (`colBranchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE; |
491 |
|
492 |
-- |
487 |
-- Table: collections_tracking |
493 |
-- Table: collections_tracking |
488 |
-- |
494 |
-- |
489 |
DROP TABLE IF EXISTS collections_tracking; |
495 |
DROP TABLE IF EXISTS collections_tracking; |