Lines 2132-2138
CREATE TABLE `subscription` ( -- information related to the subscription
Link Here
|
2132 |
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription |
2132 |
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription |
2133 |
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid |
2133 |
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid |
2134 |
`startdate` date default NULL, -- start date for this subscription |
2134 |
`startdate` date default NULL, -- start date for this subscription |
2135 |
`aqbooksellerid` int(11) default 0, -- foreign key for aqbooksellers.id to link to the vendor |
2135 |
`aqbooksellerid` int(11) NULL DEFAULT NULL, -- foreign key for aqbooksellers.id to link to the vendor |
2136 |
`cost` int(11) default 0, |
2136 |
`cost` int(11) default 0, |
2137 |
`aqbudgetid` int(11) default 0, |
2137 |
`aqbudgetid` int(11) default 0, |
2138 |
`weeklength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
2138 |
`weeklength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
Lines 2174-2180
CREATE TABLE `subscription` ( -- information related to the subscription
Link Here
|
2174 |
PRIMARY KEY (`subscriptionid`), |
2174 |
PRIMARY KEY (`subscriptionid`), |
2175 |
KEY `by_biblionumber` (`biblionumber`), |
2175 |
KEY `by_biblionumber` (`biblionumber`), |
2176 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2176 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2177 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE |
2177 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2178 |
CONSTRAINT subscription_ibfk_aqbooksellerid FOREIGN KEY (aqbooksellerid) REFERENCES aqbooksellers (id) ON DELETE RESTRICT ON UPDATE CASCADE |
2178 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2179 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2179 |
|
2180 |
|
2180 |
-- |
2181 |
-- |