Lines 2095-2101
CREATE TABLE `subscription` ( -- information related to the subscription
Link Here
|
2095 |
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription |
2095 |
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription |
2096 |
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid |
2096 |
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid |
2097 |
`startdate` date default NULL, -- start date for this subscription |
2097 |
`startdate` date default NULL, -- start date for this subscription |
2098 |
`aqbooksellerid` int(11) default 0, -- foreign key for aqbooksellers.id to link to the vendor |
2098 |
`aqbooksellerid` int(11) NULL DEFAULT NULL, -- foreign key for aqbooksellers.id to link to the vendor |
2099 |
`cost` int(11) default 0, |
2099 |
`cost` int(11) default 0, |
2100 |
`aqbudgetid` int(11) default 0, |
2100 |
`aqbudgetid` int(11) default 0, |
2101 |
`weeklength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
2101 |
`weeklength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
Lines 2137-2143
CREATE TABLE `subscription` ( -- information related to the subscription
Link Here
|
2137 |
PRIMARY KEY (`subscriptionid`), |
2137 |
PRIMARY KEY (`subscriptionid`), |
2138 |
KEY `by_biblionumber` (`biblionumber`), |
2138 |
KEY `by_biblionumber` (`biblionumber`), |
2139 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2139 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2140 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE |
2140 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2141 |
CONSTRAINT subscription_ibfk_aqbooksellerid FOREIGN KEY (aqbooksellerid) REFERENCES aqbooksellers (id) ON DELETE RESTRICT ON UPDATE CASCADE |
2141 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2142 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2142 |
|
2143 |
|
2143 |
-- |
2144 |
-- |