`fine` decimal(28,6) default NULL, -- fine amount
`finedays` int(11) default NULL, -- suspension in days
`maxsuspensiondays` int(11) default NULL, -- max suspension days
+ `suspension_chargeperiod` int(11) default '1', -- how often the finedays is charged
`firstremind` int(11) default NULL, -- fine grace period
`chargeperiod` int(11) default NULL, -- how often the fine amount is charged
`chargeperiod_charge_at` tinyint(1) NOT NULL DEFAULT '0', -- Should fine be given at the start ( 1 ) or the end ( 0 ) of the period
`repeatable` tinyint(4) NOT NULL default 0,
`mandatory` tinyint(4) NOT NULL default 0,
`authorised_value` varchar(10) default NULL,
+ `ind1_defaultvalue` varchar(1) NOT NULL default '',
+ `ind2_defaultvalue` varchar(1) NOT NULL default '',
`frameworkcode` varchar(4) NOT NULL default '',
PRIMARY KEY (`frameworkcode`,`tagfield`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
`label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
- `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
+ `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum', 'isbn', 'stdno') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
PRIMARY KEY (`id`),
UNIQUE KEY (`name` (191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
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`
--
`description` LONGTEXT,
`dispute` LONGTEXT,
`accounttype` varchar(5) default NULL,
+ `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE
`amountoutstanding` decimal(28,6) default NULL,
`lastincrement` decimal(28,6) default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`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
UNIQUE KEY title ( title )
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+--
+-- Table structure for table 'oauth_access_tokens'
+--
+
+DROP TABLE IF EXISTS `oauth_access_tokens`;
+CREATE TABLE `oauth_access_tokens` (
+ `access_token` VARCHAR(191) NOT NULL, -- generarated access token
+ `client_id` VARCHAR(191) NOT NULL, -- the client id the access token belongs to
+ `expires` INT NOT NULL, -- expiration time in seconds
+ PRIMARY KEY (`access_token`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;