|
Lines 3276-3281
ALTER TABLE `patron_list_patrons`
Link Here
|
| 3276 |
ADD CONSTRAINT patron_list_patrons_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE; |
3276 |
ADD CONSTRAINT patron_list_patrons_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE; |
| 3277 |
|
3277 |
|
| 3278 |
|
3278 |
|
|
|
3279 |
-- |
| 3280 |
-- Table structure for table 'aqcreditnotes' |
| 3281 |
-- |
| 3282 |
|
| 3283 |
DROP TABLE IF EXISTS aqcreditnotes; |
| 3284 |
CREATE TABLE aqcreditnotes ( |
| 3285 |
`creditnote_id` int(11) NOT NULL AUTO_INCREMENT, -- ID of the creditnote, primary key |
| 3286 |
`booksellerid` int(11) NOT NULL, -- foreign key to aqbooksellers |
| 3287 |
`invoiceid` int(11) NOT NULL, -- foreign key to aqinvoices |
| 3288 |
`vendorrefid` varchar(20) NOT NULL, -- Vendorreferenceid |
| 3289 |
`budget_id` int(11) NOT NULL, -- foreign key to aqbudgets |
| 3290 |
`amountcredit` decimal(28,6) default NULL, -- amountcredit cost |
| 3291 |
`creditdate` date default NULL, -- date of amountcredit |
| 3292 |
`notes` mediumtext, -- notes of amountcredit |
| 3293 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched |
| 3294 |
PRIMARY KEY (creditnote_id), |
| 3295 |
CONSTRAINT aqcreditnotes_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3296 |
CONSTRAINT aqcreditnotes_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3297 |
CONSTRAINT aqcreditnotes_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE |
| 3298 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 3299 |
|
| 3300 |
|
| 3279 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
3301 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 3280 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
3302 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 3281 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
3303 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |