|
Lines 3313-3318
ALTER TABLE `patron_list_patrons`
Link Here
|
| 3313 |
ADD CONSTRAINT patron_list_patrons_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE; |
3313 |
ADD CONSTRAINT patron_list_patrons_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE; |
| 3314 |
|
3314 |
|
| 3315 |
|
3315 |
|
|
|
3316 |
-- |
| 3317 |
-- Table structure for table 'aqcreditnotes' |
| 3318 |
-- |
| 3319 |
|
| 3320 |
DROP TABLE IF EXISTS aqcreditnotes; |
| 3321 |
CREATE TABLE aqcreditnotes ( |
| 3322 |
`creditnote_id` int(11) NOT NULL AUTO_INCREMENT, -- ID of the creditnote, primary key |
| 3323 |
`booksellerid` int(11) NOT NULL, -- foreign key to aqbooksellers |
| 3324 |
`invoiceid` int(11) NOT NULL, -- foreign key to aqinvoices |
| 3325 |
`vendorrefid` varchar(20) NOT NULL, -- Vendorreferenceid |
| 3326 |
`budget_id` int(11) NOT NULL, -- foreign key to aqbudgets |
| 3327 |
`amountcredit` decimal(28,6) default NULL, -- amountcredit cost |
| 3328 |
`creditdate` date default NULL, -- date of amountcredit |
| 3329 |
`notes` mediumtext, -- notes of amountcredit |
| 3330 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched |
| 3331 |
PRIMARY KEY (creditnote_id), |
| 3332 |
CONSTRAINT aqcreditnotes_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3333 |
CONSTRAINT aqcreditnotes_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3334 |
CONSTRAINT aqcreditnotes_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE |
| 3335 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 3336 |
|
| 3337 |
|
| 3316 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3338 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 3317 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3339 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 3318 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
3340 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |