Lines 1956-1973
CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history
Link Here
|
1956 |
-- |
1956 |
-- |
1957 |
|
1957 |
|
1958 |
DROP TABLE IF EXISTS `serial`; |
1958 |
DROP TABLE IF EXISTS `serial`; |
1959 |
CREATE TABLE `serial` ( |
1959 |
CREATE TABLE `serial` ( -- issues related to subscriptions |
1960 |
`serialid` int(11) NOT NULL auto_increment, |
1960 |
`serialid` int(11) NOT NULL auto_increment, -- unique key for the issue |
1961 |
`biblionumber` varchar(100) NOT NULL default '', |
1961 |
`biblionumber` varchar(100) NOT NULL default '', -- foreign key for the biblio.biblionumber that this issue is attached to |
1962 |
`subscriptionid` varchar(100) NOT NULL default '', |
1962 |
`subscriptionid` varchar(100) NOT NULL default '', -- foreign key to the subscription.subscriptionid that this issue is part of |
1963 |
`serialseq` varchar(100) NOT NULL default '', |
1963 |
`serialseq` varchar(100) NOT NULL default '', -- issue information (volume, number, etc) |
1964 |
`status` tinyint(4) NOT NULL default 0, |
1964 |
`status` tinyint(4) NOT NULL default 0, -- status code for this issue (see manual for full descriptions) |
1965 |
`planneddate` date default NULL, |
1965 |
`planneddate` date default NULL, -- date expected |
1966 |
`notes` text, |
1966 |
`notes` text, -- notes |
1967 |
`publisheddate` date default NULL, |
1967 |
`publisheddate` date default NULL, -- date published |
1968 |
`claimdate` date default NULL, |
1968 |
`claimdate` date default NULL, -- date claimed |
1969 |
claims_count int(11) default 0, |
1969 |
claims_count int(11) default 0, -- number of claims made related to this issue |
1970 |
`routingnotes` text, |
1970 |
`routingnotes` text, -- notes from the routing list |
1971 |
PRIMARY KEY (`serialid`) |
1971 |
PRIMARY KEY (`serialid`) |
1972 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1972 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1973 |
|
1973 |
|
Lines 2090-2136
CREATE TABLE subscription_numberpatterns (
Link Here
|
2090 |
-- |
2090 |
-- |
2091 |
|
2091 |
|
2092 |
DROP TABLE IF EXISTS `subscription`; |
2092 |
DROP TABLE IF EXISTS `subscription`; |
2093 |
CREATE TABLE `subscription` ( |
2093 |
CREATE TABLE `subscription` ( -- information related to the subscription |
2094 |
`biblionumber` int(11) NOT NULL default 0, |
2094 |
`biblionumber` int(11) NOT NULL default 0, -- foreign key for biblio.biblionumber that this subscription is attached to |
2095 |
`subscriptionid` int(11) NOT NULL auto_increment, |
2095 |
`subscriptionid` int(11) NOT NULL auto_increment, -- unique key for this subscription |
2096 |
`librarian` varchar(100) default '', |
2096 |
`librarian` varchar(100) default '', -- the librarian's username from borrowers.userid |
2097 |
`startdate` date default NULL, |
2097 |
`startdate` date default NULL, -- start date for this subscription |
2098 |
`aqbooksellerid` int(11) default 0, |
2098 |
`aqbooksellerid` int(11) default 0, -- 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, |
2101 |
`weeklength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or numberlength is set) |
2102 |
`monthlength` int(11) default 0, |
2102 |
`monthlength` int(11) default 0, -- subscription length in weeks (will not be filled in if weeklength or numberlength is set) |
2103 |
`numberlength` int(11) default 0, |
2103 |
`numberlength` int(11) default 0, -- subscription length in weeks (will not be filled in if monthlength or weeklength is set) |
2104 |
`periodicity` integer default null, |
2104 |
`periodicity` integer default null, -- frequency type links to subscription_frequencies.id |
2105 |
countissuesperunit INTEGER NOT NULL DEFAULT 1, |
2105 |
countissuesperunit INTEGER NOT NULL DEFAULT 1, |
2106 |
`notes` mediumtext, |
2106 |
`notes` mediumtext, -- notes |
2107 |
`status` varchar(100) NOT NULL default '', |
2107 |
`status` varchar(100) NOT NULL default '', -- status of this subscription |
2108 |
`lastvalue1` int(11) default NULL, |
2108 |
`lastvalue1` int(11) default NULL, |
2109 |
`innerloop1` int(11) default 0, |
2109 |
`innerloop1` int(11) default 0, |
2110 |
`lastvalue2` int(11) default NULL, |
2110 |
`lastvalue2` int(11) default NULL, |
2111 |
`innerloop2` int(11) default 0, |
2111 |
`innerloop2` int(11) default 0, |
2112 |
`lastvalue3` int(11) default NULL, |
2112 |
`lastvalue3` int(11) default NULL, |
2113 |
`innerloop3` int(11) default 0, |
2113 |
`innerloop3` int(11) default 0, |
2114 |
`firstacquidate` date default NULL, |
2114 |
`firstacquidate` date default NULL, -- first issue received date |
2115 |
`manualhistory` tinyint(1) NOT NULL default 0, |
2115 |
`manualhistory` tinyint(1) NOT NULL default 0, -- yes or no to managing the history manually |
2116 |
`irregularity` text, |
2116 |
`irregularity` text, -- any irregularities in the subscription |
2117 |
skip_serialseq BOOLEAN NOT NULL DEFAULT 0, |
2117 |
skip_serialseq BOOLEAN NOT NULL DEFAULT 0, |
2118 |
`letter` varchar(20) default NULL, |
2118 |
`letter` varchar(20) default NULL, |
2119 |
`numberpattern` integer default null, |
2119 |
`numberpattern` integer default null, -- the numbering pattern used links to subscription_numberpatterns.id |
2120 |
locale VARCHAR(80) DEFAULT NULL, |
2120 |
locale VARCHAR(80) DEFAULT NULL, -- for foreign language subscriptions to display months, seasons, etc correctly |
2121 |
`distributedto` text, |
2121 |
`distributedto` text, |
2122 |
`internalnotes` longtext, |
2122 |
`internalnotes` longtext, |
2123 |
`callnumber` text, |
2123 |
`callnumber` text, -- default call number |
2124 |
`location` varchar(80) NULL default '', |
2124 |
`location` varchar(80) NULL default '', -- default shelving location (items.location) |
2125 |
`branchcode` varchar(10) NOT NULL default '', |
2125 |
`branchcode` varchar(10) NOT NULL default '', -- default branches (items.homebranch) |
2126 |
`lastbranch` varchar(10), |
2126 |
`lastbranch` varchar(10), |
2127 |
`serialsadditems` tinyint(1) NOT NULL default '0', |
2127 |
`serialsadditems` tinyint(1) NOT NULL default '0', -- does receiving this serial create an item record |
2128 |
`staffdisplaycount` VARCHAR(10) NULL, |
2128 |
`staffdisplaycount` VARCHAR(10) NULL, -- how many issues to show to the staff |
2129 |
`opacdisplaycount` VARCHAR(10) NULL, |
2129 |
`opacdisplaycount` VARCHAR(10) NULL, -- how many issues to show to the public |
2130 |
`graceperiod` int(11) NOT NULL default '0', |
2130 |
`graceperiod` int(11) NOT NULL default '0', -- grace period in days |
2131 |
`enddate` date default NULL, |
2131 |
`enddate` date default NULL, -- subscription end date |
2132 |
`closed` INT(1) NOT NULL DEFAULT 0, |
2132 |
`closed` INT(1) NOT NULL DEFAULT 0, -- yes / no if the subscription is closed |
2133 |
`reneweddate` date default NULL, |
2133 |
`reneweddate` date default NULL, -- date of last renewal for the subscription |
2134 |
PRIMARY KEY (`subscriptionid`), |
2134 |
PRIMARY KEY (`subscriptionid`), |
2135 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2135 |
CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE, |
2136 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE |
2136 |
CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE |
2137 |
- |
|
|