Lines 2187-2192
CREATE TABLE `suggestions` ( -- purchase suggestions
Link Here
|
2187 |
accepteddate date default NULL, -- date the suggestion was marked as accepted |
2187 |
accepteddate date default NULL, -- date the suggestion was marked as accepted |
2188 |
rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table |
2188 |
rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table |
2189 |
rejecteddate date default NULL, -- date the suggestion was marked as rejected |
2189 |
rejecteddate date default NULL, -- date the suggestion was marked as rejected |
|
|
2190 |
orderedby INT(11) NULL DEFAULT NULL, -- borrowernumber for the librarian who ordered the suggestion |
2191 |
ordereddate DATE NULL DEFAULT NULL, -- date the suggestion was marked as ordered |
2190 |
`STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) |
2192 |
`STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) |
2191 |
`note` mediumtext, -- note entered on the suggestion |
2193 |
`note` mediumtext, -- note entered on the suggestion |
2192 |
`author` varchar(80) default NULL, -- author of the suggested item |
2194 |
`author` varchar(80) default NULL, -- author of the suggested item |
Lines 2213-2219
CREATE TABLE `suggestions` ( -- purchase suggestions
Link Here
|
2213 |
PRIMARY KEY (`suggestionid`), |
2215 |
PRIMARY KEY (`suggestionid`), |
2214 |
KEY `suggestedby` (`suggestedby`), |
2216 |
KEY `suggestedby` (`suggestedby`), |
2215 |
KEY `managedby` (`managedby`), |
2217 |
KEY `managedby` (`managedby`), |
2216 |
CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE |
2218 |
CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2219 |
CONSTRAINT suggestions_orderedby_fk |
2220 |
FOREIGN KEY (orderedby) REFERENCES borrowers (borrowernumber) |
2221 |
ON DELETE SET NULL ON UPDATE CASCADE |
2217 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2222 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2218 |
|
2223 |
|
2219 |
-- |
2224 |
-- |