`cn_class` varchar(30) default NULL,
`cn_item` varchar(10) default NULL,
`cn_suffix` varchar(10) default NULL,
- `cn_sort` varchar(30) default NULL,
- `agerestriction` varchar(255) default NULL,
+ `cn_sort` varchar(30) default NULL, -- normalized version of the call number used for sorting
+ `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
`totalissues` int(10),
`marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
PRIMARY KEY (`biblioitemnumber`),
`altcontactsurname` varchar(255) default NULL, -- surname or last name of the alternate contact for the patron/borrower
`altcontactaddress1` varchar(255) default NULL, -- the first address line for the alternate contact for the patron/borrower
`altcontactaddress2` varchar(255) default NULL, -- the second address line for the alternate contact for the patron/borrower
- `altcontactaddress3` varchar(255) default NULL, -- the third address line for the alternate contact for the patron/borrower
- `altcontactstate` text default NULL, -- the city and state for the alternate contact for the patron/borrower
+ `altcontactaddress3` varchar(255) default NULL, -- the city for the alternate contact for the patron/borrower
+ `altcontactstate` text default NULL, -- the state for the alternate contact for the patron/borrower
`altcontactzipcode` varchar(50) default NULL, -- the zipcode for the alternate contact for the patron/borrower
`altcontactcountry` text default NULL, -- the country for the alternate contact for the patron/borrower
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
`cn_class` varchar(30) default NULL,
`cn_item` varchar(10) default NULL,
`cn_suffix` varchar(10) default NULL,
- `cn_sort` varchar(30) default NULL,
- `agerestriction` varchar(255) default NULL,
+ `cn_sort` varchar(30) default NULL, -- normalized version of the call number used for sorting
+ `agerestriction` varchar(255) default NULL, -- target audience/age restriction from the bib record (MARC21 521$a)
`totalissues` int(10),
`marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
PRIMARY KEY (`biblioitemnumber`),
`altcontactsurname` varchar(255) default NULL, -- surname or last name of the alternate contact for the patron/borrower
`altcontactaddress1` varchar(255) default NULL, -- the first address line for the alternate contact for the patron/borrower
`altcontactaddress2` varchar(255) default NULL, -- the second address line for the alternate contact for the patron/borrower
- `altcontactaddress3` varchar(255) default NULL, -- the third address line for the alternate contact for the patron/borrower
- `altcontactstate` text default NULL, -- the city and state for the alternate contact for the patron/borrower
+ `altcontactaddress3` varchar(255) default NULL, -- the city for the alternate contact for the patron/borrower
+ `altcontactstate` text default NULL, -- the state for the alternate contact for the patron/borrower
`altcontactzipcode` varchar(50) default NULL, -- the zipcode for the alternate contact for the patron/borrower
`altcontactcountry` text default NULL, -- the country for the alternate contact for the patron/borrower
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower
`matcher_id` int(11) default NULL, -- the id of the match rule used (matchpoints.matcher_id)
`template_id` int(11) default NULL,
`branchcode` varchar(10) default NULL,
- `num_biblios` int(11) NOT NULL default 0, -- number of bib records in the file
+ `num_records` int(11) NOT NULL default 0, -- number of records in the file
`num_items` int(11) NOT NULL default 0, -- number of items in the file
`upload_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- date and time the file was uploaded
`overlay_action` enum('replace', 'create_new', 'use_template', 'ignore') NOT NULL default 'create_new', -- how to handle duplicate records
`item_action` enum('always_add', 'add_only_for_matches', 'add_only_for_new', 'ignore') NOT NULL default 'always_add', -- what to do with item records
`import_status` enum('staging', 'staged', 'importing', 'imported', 'reverting', 'reverted', 'cleaned') NOT NULL default 'staging', -- the status of the imported file
`batch_type` enum('batch', 'z3950', 'webservice') NOT NULL default 'batch', -- where this batch has come from
+ `record_type` enum('biblio', 'auth', 'holdings') NOT NULL default 'biblio', -- type of record in the batch
`file_name` varchar(100), -- the name of the file uploaded
`comments` mediumtext, -- any comments added when the file was uploaded
PRIMARY KEY (`import_batch_id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
+-- Table structure for table `import_auths`
+--
+
+DROP TABLE IF EXISTS `import_auths`;
+CREATE TABLE `import_auths` (
+ `import_record_id` int(11) NOT NULL,
+ `matched_authid` int(11) default NULL,
+ `control_number` varchar(25) default NULL,
+ `authorized_heading` varchar(128) default NULL,
+ `original_source` varchar(25) default NULL,
+ CONSTRAINT `import_auths_ibfk_1` FOREIGN KEY (`import_record_id`)
+ REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ KEY `matched_authid` (`matched_authid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
-- Table structure for table `import_biblios`
--
`itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
`associatedborrower` int(11) default NULL,
+ `ccode` int(11) default NULL, -- foreign key from the items table, links transaction to a specific collection code
KEY `timeidx` (`datetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`authorisedby` varchar(10) default NULL, -- the borrowernumber of the person who created the basket
`booksellerinvoicenumber` mediumtext, -- appears to always be NULL
`basketgroupid` int(11), -- links this basket to its group (aqbasketgroups.id)
+ `deliveryplace` varchar(10) default NULL, -- basket delivery place
+ `billingplace` varchar(10) default NULL, -- basket billing place
PRIMARY KEY (`basketno`),
KEY `booksellerid` (`booksellerid`),
KEY `basketgroupid` (`basketgroupid`),
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order line was last modified
`rrp` decimal(13,2) default NULL, -- the replacement cost for this line item
`ecost` decimal(13,2) default NULL, -- the estimated cost for this line item
- `gst` decimal(13,2) default NULL, -- the tax rate for this line item
+ `gstrate` decimal(6,4) default NULL, -- the tax rate for this line item
+ `discount` float(6,4) default NULL, -- the discount for this line item
`budget_id` int(11) NOT NULL, -- the fund this order goes against (aqbudgets.budget_id)
`budgetgroup_id` int(11) NOT NULL, -- not used? always zero
`budgetdate` date default NULL, -- not used? always NULL