From 118399fa5a102a89416f11e7747add437d834d4a 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 65b0ff3e42..ead5203f6a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -492,6 +492,46 @@ CREATE TABLE `currency` ( PRIMARY KEY (`currency`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_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` LONGTEXT NOT NULL, -- vendor name + `address1` LONGTEXT, -- first line of vendor physical address + `address2` LONGTEXT, -- second line of vendor physical address + `address3` LONGTEXT, -- third line of vendor physical address + `address4` LONGTEXT, -- fourth line of vendor physical address + `phone` varchar(30) default NULL, -- vendor phone number + `accountnumber` LONGTEXT, -- unused in Koha + `othersupplier` LONGTEXT, -- unused in Koha + `currency` varchar(10) NOT NULL default '', -- unused in Koha + `booksellerfax` LONGTEXT, -- vendor fax number + `notes` LONGTEXT, -- order notes + `bookselleremail` LONGTEXT, -- vendor email + `booksellerurl` LONGTEXT, -- unused in Koha + `postal` LONGTEXT, -- 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=utf8mb4 COLLATE=utf8mb4_unicode_ci; + -- -- Table structure for table `deletedbiblio` -- @@ -2799,46 +2839,6 @@ CREATE TABLE `alert` ( KEY `type` (`type`,`externalid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_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` LONGTEXT NOT NULL, -- vendor name - `address1` LONGTEXT, -- first line of vendor physical address - `address2` LONGTEXT, -- second line of vendor physical address - `address3` LONGTEXT, -- third line of vendor physical address - `address4` LONGTEXT, -- fourth line of vendor physical address - `phone` varchar(30) default NULL, -- vendor phone number - `accountnumber` LONGTEXT, -- unused in Koha - `othersupplier` LONGTEXT, -- unused in Koha - `currency` varchar(10) NOT NULL default '', -- unused in Koha - `booksellerfax` LONGTEXT, -- vendor fax number - `notes` LONGTEXT, -- order notes - `bookselleremail` LONGTEXT, -- vendor email - `booksellerurl` LONGTEXT, -- unused in Koha - `postal` LONGTEXT, -- 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=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -- -- Table structure for table `aqbasketgroups` -- -- 2.20.1