View | Details | Raw Unified | Return to bug 10703
Collapse All | Expand All

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

Return to bug 10703