[26/30] Updating kohastructure.sql to reflect changes introduced in Patron Card Creator work
This commit is contained in:
parent
48dc1cb4b0
commit
c102b61ef5
1 changed files with 109 additions and 78 deletions
|
@ -1013,65 +1013,95 @@ CREATE TABLE `itemtypes` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `labels_batches`
|
||||
-- Table structure for table `creator_batches`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `labels_batches`;
|
||||
CREATE TABLE `labels_batches` (
|
||||
`label_id` int(11) NOT NULL auto_increment,
|
||||
`batch_id` int(10) NOT NULL default '1',
|
||||
`item_number` int(11) NOT NULL default '0',
|
||||
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`branch_code` varchar(10) NOT NULL default 'NB',
|
||||
PRIMARY KEY USING BTREE (`label_id`),
|
||||
KEY `branch_fk` (`branch_code`),
|
||||
KEY `item_fk` (`item_number`),
|
||||
CONSTRAINT `item_fk_constraint` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE,
|
||||
CONSTRAINT `branch_fk_constraint` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE
|
||||
DROP TABLE IF EXISTS `creator_batches`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `creator_batches` (
|
||||
`label_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`batch_id` int(10) NOT NULL DEFAULT '1',
|
||||
`item_number` int(11) DEFAULT NULL,
|
||||
`borrower_number` int(11) DEFAULT NULL,
|
||||
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`branch_code` varchar(10) NOT NULL DEFAULT 'NB',
|
||||
`creator` char(15) NOT NULL DEFAULT 'Labels',
|
||||
PRIMARY KEY (`label_id`) USING BTREE,
|
||||
KEY `branch_fk_constraint` (`branch_code`),
|
||||
KEY `item_fk_constraint` (`item_number`),
|
||||
KEY `borrower_fk_constraint` (`borrower_number`),
|
||||
CONSTRAINT `creator_batches_ibfk_1` FOREIGN KEY (`borrower_number`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `creator_batches_ibfk_2` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE,
|
||||
CONSTRAINT `creator_batches_ibfk_3` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `labels_layouts`
|
||||
-- Table structure for table `creator_images`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `labels_layouts`;
|
||||
CREATE TABLE `labels_layouts` (
|
||||
`layout_id` int(4) NOT NULL auto_increment,
|
||||
`barcode_type` char(100) NOT NULL default 'CODE39',
|
||||
`printing_type` char(32) NOT NULL default 'BAR',
|
||||
`layout_name` char(20) NOT NULL default 'DEFAULT',
|
||||
`guidebox` int(1) default '0',
|
||||
`font` char(10) character set utf8 collate utf8_unicode_ci NOT NULL default 'TR',
|
||||
`font_size` int(4) NOT NULL default '10',
|
||||
`callnum_split` int(1) default '0',
|
||||
`text_justify` char(1) character set utf8 collate utf8_unicode_ci NOT NULL default 'L',
|
||||
`format_string` varchar(210) NOT NULL default 'barcode',
|
||||
PRIMARY KEY USING BTREE (`layout_id`)
|
||||
DROP TABLE IF EXISTS `creator_images`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `creator_images` (
|
||||
`image_id` int(4) NOT NULL AUTO_INCREMENT,
|
||||
`imagefile` mediumblob,
|
||||
`image_name` char(20) NOT NULL DEFAULT 'DEFAULT',
|
||||
PRIMARY KEY (`image_id`) USING BTREE,
|
||||
UNIQUE KEY `image_name_index` (`image_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `labels_templates`
|
||||
-- Table structure for table `creator_layouts`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `labels_templates`;
|
||||
CREATE TABLE `labels_templates` (
|
||||
`template_id` int(4) NOT NULL auto_increment,
|
||||
`profile_id` int(4) default NULL,
|
||||
`template_code` char(100) NOT NULL default 'DEFAULT TEMPLATE',
|
||||
`template_desc` char(100) NOT NULL default 'Default description',
|
||||
`page_width` float NOT NULL default '0',
|
||||
`page_height` float NOT NULL default '0',
|
||||
`label_width` float NOT NULL default '0',
|
||||
`label_height` float NOT NULL default '0',
|
||||
`top_text_margin` float NOT NULL default '0',
|
||||
`left_text_margin` float NOT NULL default '0',
|
||||
`top_margin` float NOT NULL default '0',
|
||||
`left_margin` float NOT NULL default '0',
|
||||
`cols` int(2) NOT NULL default '0',
|
||||
`rows` int(2) NOT NULL default '0',
|
||||
`col_gap` float NOT NULL default '0',
|
||||
`row_gap` float NOT NULL default '0',
|
||||
`units` char(20) NOT NULL default 'POINT',
|
||||
DROP TABLE IF EXISTS `creator_layouts`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `creator_layouts` (
|
||||
`layout_id` int(4) NOT NULL AUTO_INCREMENT,
|
||||
`barcode_type` char(100) NOT NULL DEFAULT 'CODE39',
|
||||
`start_label` int(2) NOT NULL DEFAULT '1',
|
||||
`printing_type` char(32) NOT NULL DEFAULT 'BAR',
|
||||
`layout_name` char(20) NOT NULL DEFAULT 'DEFAULT',
|
||||
`guidebox` int(1) DEFAULT '0',
|
||||
`font` char(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'TR',
|
||||
`font_size` int(4) NOT NULL DEFAULT '10',
|
||||
`units` char(20) NOT NULL DEFAULT 'POINT',
|
||||
`callnum_split` int(1) DEFAULT '0',
|
||||
`text_justify` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'L',
|
||||
`format_string` varchar(210) NOT NULL DEFAULT 'barcode',
|
||||
`layout_xml` text NOT NULL,
|
||||
`creator` char(15) NOT NULL DEFAULT 'Labels',
|
||||
PRIMARY KEY (`layout_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `creator_templates`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `creator_templates`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `creator_templates` (
|
||||
`template_id` int(4) NOT NULL AUTO_INCREMENT,
|
||||
`profile_id` int(4) DEFAULT NULL,
|
||||
`template_code` char(100) NOT NULL DEFAULT 'DEFAULT TEMPLATE',
|
||||
`template_desc` char(100) NOT NULL DEFAULT 'Default description',
|
||||
`page_width` float NOT NULL DEFAULT '0',
|
||||
`page_height` float NOT NULL DEFAULT '0',
|
||||
`label_width` float NOT NULL DEFAULT '0',
|
||||
`label_height` float NOT NULL DEFAULT '0',
|
||||
`top_text_margin` float NOT NULL DEFAULT '0',
|
||||
`left_text_margin` float NOT NULL DEFAULT '0',
|
||||
`top_margin` float NOT NULL DEFAULT '0',
|
||||
`left_margin` float NOT NULL DEFAULT '0',
|
||||
`cols` int(2) NOT NULL DEFAULT '0',
|
||||
`rows` int(2) NOT NULL DEFAULT '0',
|
||||
`col_gap` float NOT NULL DEFAULT '0',
|
||||
`row_gap` float NOT NULL DEFAULT '0',
|
||||
`units` char(20) NOT NULL DEFAULT 'POINT',
|
||||
`creator` char(15) NOT NULL DEFAULT 'Labels',
|
||||
PRIMARY KEY (`template_id`),
|
||||
KEY `template_profile_fk_constraint` (`profile_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
@ -1405,8 +1435,9 @@ CREATE TABLE `printers_profile` (
|
|||
`creep_horz` float NOT NULL default '0',
|
||||
`creep_vert` float NOT NULL default '0',
|
||||
`units` char(20) NOT NULL default 'POINT',
|
||||
`creator` char(15) NOT NULL DEFAULT 'Labels',
|
||||
PRIMARY KEY (`profile_id`),
|
||||
UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`)
|
||||
UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`,`creator`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
|
Loading…
Reference in a new issue