X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=installer%2Fdata%2Fmysql%2Fkohastructure.sql;h=c6f7f019d07ab168886162b9a4b0cec2a739e6c8;hb=948704964073dd8dea146d959ad5ed690ccafe67;hp=ea59d0389527eca8baf6d532907231988c48babc;hpb=a5c28cc24b857c050c1fc41e270a601772cc381d;p=koha.git diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index ea59d03895..c6f7f019d0 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1713,6 +1713,26 @@ CREATE TABLE borrower_sync ( CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +-- +-- Table structure for table api_keys +-- + +DROP TABLE IF EXISTS `api_keys`; +CREATE TABLE `api_keys` ( + `client_id` VARCHAR(191) NOT NULL, -- API client ID + `secret` VARCHAR(191) NOT NULL, -- API client secret used for API authentication + `description` VARCHAR(255) NOT NULL, -- API client description + `patron_id` INT(11) NOT NULL, -- Foreign key to the borrowers table + `active` TINYINT(1) DEFAULT 1 NOT NULL, -- 0 means this API key is revoked + PRIMARY KEY `client_id` (`client_id`), + UNIQUE KEY `secret` (`secret`), + KEY `patron_id` (`patron_id`), + CONSTRAINT `api_keys_fk_patron_id` + FOREIGN KEY (`patron_id`) + REFERENCES `borrowers` (`borrowernumber`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + -- -- Table structure for table `issues` -- @@ -3139,6 +3159,7 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items `unitprice_tax_excluded` decimal(28,6) default NULL, -- the unit price excluding tax (on receiving) `unitprice_tax_included` decimal(28,6) default NULL, -- the unit price including tax (on receiving) `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far + `created_by` int(11) NULL DEFAULT NULL, -- the borrowernumber of order line's creator `datecancellationprinted` date default NULL, -- the date the line item was deleted `cancellationreason` MEDIUMTEXT default NULL, -- reason of cancellation `order_internalnote` LONGTEXT, -- notes related to this order line, made for staff