Lines 3007-3012
CREATE TABLE `suggestions` ( -- purchase suggestions
Link Here
|
3007 |
accepteddate date default NULL, -- date the suggestion was marked as accepted |
3007 |
accepteddate date default NULL, -- date the suggestion was marked as accepted |
3008 |
rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table |
3008 |
rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table |
3009 |
rejecteddate date default NULL, -- date the suggestion was marked as rejected |
3009 |
rejecteddate date default NULL, -- date the suggestion was marked as rejected |
|
|
3010 |
orderedby INT(11) NULL DEFAULT NULL, -- borrowernumber for the librarian who ordered the suggestion |
3011 |
ordereddate DATE NULL DEFAULT NULL, -- date the suggestion was marked as ordered |
3010 |
`STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) |
3012 |
`STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) |
3011 |
`note` LONGTEXT, -- note entered on the suggestion |
3013 |
`note` LONGTEXT, -- note entered on the suggestion |
3012 |
`author` varchar(80) default NULL, -- author of the suggested item |
3014 |
`author` varchar(80) default NULL, -- author of the suggested item |
Lines 3035-3041
CREATE TABLE `suggestions` ( -- purchase suggestions
Link Here
|
3035 |
KEY `status` (`STATUS`), |
3037 |
KEY `status` (`STATUS`), |
3036 |
KEY `biblionumber` (`biblionumber`), |
3038 |
KEY `biblionumber` (`biblionumber`), |
3037 |
KEY `branchcode` (`branchcode`), |
3039 |
KEY `branchcode` (`branchcode`), |
3038 |
CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE |
3040 |
CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
3041 |
CONSTRAINT suggestions_orderedby_fk FOREIGN KEY (orderedby) REFERENCES borrowers (borrowernumber) ON DELETE SET NULL ON UPDATE CASCADE |
3039 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3042 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3040 |
|
3043 |
|
3041 |
-- |
3044 |
-- |