Lines 1763-1769
CREATE TABLE `issues` ( -- information related to check outs or issues
Link Here
|
1763 |
|
1763 |
|
1764 |
DROP TABLE IF EXISTS `old_issues`; |
1764 |
DROP TABLE IF EXISTS `old_issues`; |
1765 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
1765 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
1766 |
`issue_id` int(11) NOT NULL, -- primary key for issues table |
1766 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for old_issues table |
|
|
1767 |
`issue_id` int(11) NOT NULL, -- primary key from the issues table |
1767 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1768 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1768 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1769 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1769 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
1770 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
Lines 1776-1782
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
Link Here
|
1776 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1777 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1777 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1778 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1778 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
1779 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
1779 |
PRIMARY KEY (`issue_id`), |
1780 |
PRIMARY KEY (`id`), |
1780 |
KEY `old_issuesborridx` (`borrowernumber`), |
1781 |
KEY `old_issuesborridx` (`borrowernumber`), |
1781 |
KEY `old_issuesitemidx` (`itemnumber`), |
1782 |
KEY `old_issuesitemidx` (`itemnumber`), |
1782 |
KEY `branchcode_idx` (`branchcode`), |
1783 |
KEY `branchcode_idx` (`branchcode`), |
1783 |
- |
|
|