From 72913b8bb36ead776e8a4699bdb1450f2c842482 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 10 Aug 2017 10:32:53 +0200 Subject: [PATCH] Bug 18745 - kohastructure.sql: Move aqbooksellers above serial Otherwise we can't define a foreign key in serial that references aqbooksellers --- installer/data/mysql/kohastructure.sql | 80 +++++++++++++++++----------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 81940b18ec..02a177d79b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -489,6 +489,46 @@ CREATE TABLE `currency` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- +-- Table structure for table `aqbooksellers` +-- + +DROP TABLE IF EXISTS `aqbooksellers`; +CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquisitions + `id` int(11) NOT NULL auto_increment, -- primary key and unique identifier assigned by Koha + `name` mediumtext NOT NULL, -- vendor name + `address1` mediumtext, -- first line of vendor physical address + `address2` mediumtext, -- second line of vendor physical address + `address3` mediumtext, -- third line of vendor physical address + `address4` mediumtext, -- fourth line of vendor physical address + `phone` varchar(30) default NULL, -- vendor phone number + `accountnumber` mediumtext, -- unused in Koha + `othersupplier` mediumtext, -- unused in Koha + `currency` varchar(10) NOT NULL default '', -- unused in Koha + `booksellerfax` mediumtext, -- vendor fax number + `notes` mediumtext, -- order notes + `bookselleremail` mediumtext, -- vendor email + `booksellerurl` mediumtext, -- unused in Koha + `postal` mediumtext, -- vendor postal address (all lines) + `url` varchar(255) default NULL, -- vendor web address + `active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no) + `listprice` varchar(10) default NULL, -- currency code for list prices + `invoiceprice` varchar(10) default NULL, -- currency code for invoice prices + `gstreg` tinyint(4) default NULL, -- is your library charged tax (1 for yes, 0 for no) + `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no) + `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no) + `tax_rate` decimal(6,4) default NULL, -- the tax rate the library is charged + `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor + `fax` varchar(50) default NULL, -- vendor fax number + deliverytime int(11) default NULL, -- vendor delivery time + PRIMARY KEY (`id`), + KEY `listprice` (`listprice`), + KEY `invoiceprice` (`invoiceprice`), + KEY `name` (`name`(255)), + CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -- Table structure for table `deletedbiblio` -- @@ -2766,46 +2806,6 @@ CREATE TABLE `alert` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --- Table structure for table `aqbooksellers` --- - -DROP TABLE IF EXISTS `aqbooksellers`; -CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquisitions - `id` int(11) NOT NULL auto_increment, -- primary key and unique identifier assigned by Koha - `name` mediumtext NOT NULL, -- vendor name - `address1` mediumtext, -- first line of vendor physical address - `address2` mediumtext, -- second line of vendor physical address - `address3` mediumtext, -- third line of vendor physical address - `address4` mediumtext, -- fourth line of vendor physical address - `phone` varchar(30) default NULL, -- vendor phone number - `accountnumber` mediumtext, -- unused in Koha - `othersupplier` mediumtext, -- unused in Koha - `currency` varchar(10) NOT NULL default '', -- unused in Koha - `booksellerfax` mediumtext, -- vendor fax number - `notes` mediumtext, -- order notes - `bookselleremail` mediumtext, -- vendor email - `booksellerurl` mediumtext, -- unused in Koha - `postal` mediumtext, -- vendor postal address (all lines) - `url` varchar(255) default NULL, -- vendor web address - `active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no) - `listprice` varchar(10) default NULL, -- currency code for list prices - `invoiceprice` varchar(10) default NULL, -- currency code for invoice prices - `gstreg` tinyint(4) default NULL, -- is your library charged tax (1 for yes, 0 for no) - `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no) - `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no) - `tax_rate` decimal(6,4) default NULL, -- the tax rate the library is charged - `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor - `fax` varchar(50) default NULL, -- vendor fax number - deliverytime int(11) default NULL, -- vendor delivery time - PRIMARY KEY (`id`), - KEY `listprice` (`listprice`), - KEY `invoiceprice` (`invoiceprice`), - KEY `name` (`name`(255)), - CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- -- Table structure for table `aqbasketgroups` -- -- 2.11.0