+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
+-- Table structure for table `illrequests`
+--
+
+DROP TABLE IF EXISTS `illrequests`;
+CREATE TABLE illrequests (
+ illrequest_id serial PRIMARY KEY, -- ILL request number
+ borrowernumber integer DEFAULT NULL, -- Patron associated with request
+ biblio_id integer DEFAULT NULL, -- Potential bib linked to request
+ branchcode varchar(50) NOT NULL, -- The branch associated with the request
+ status varchar(50) DEFAULT NULL, -- Current Koha status of request
+ placed date DEFAULT NULL, -- Date the request was placed
+ replied date DEFAULT NULL, -- Last API response
+ updated timestamp DEFAULT CURRENT_TIMESTAMP -- Last modification to request
+ ON UPDATE CURRENT_TIMESTAMP,
+ completed date DEFAULT NULL, -- Date the request was completed
+ medium varchar(30) DEFAULT NULL, -- The Koha request type
+ accessurl varchar(500) DEFAULT NULL, -- Potential URL for accessing item
+ cost varchar(20) DEFAULT NULL, -- Cost of request
+ notesopac MEDIUMTEXT DEFAULT NULL, -- Patron notes attached to request
+ notesstaff MEDIUMTEXT DEFAULT NULL, -- Staff notes attached to request
+ orderid varchar(50) DEFAULT NULL, -- Backend id attached to request
+ backend varchar(20) DEFAULT NULL, -- The backend used to create request
+ CONSTRAINT `illrequests_bnfk`
+ FOREIGN KEY (`borrowernumber`)
+ REFERENCES `borrowers` (`borrowernumber`)
+ ON UPDATE CASCADE ON DELETE CASCADE,
+ CONSTRAINT `illrequests_bcfk_2`
+ FOREIGN KEY (`branchcode`)
+ REFERENCES `branches` (`branchcode`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
+-- Table structure for table `illrequestattributes`
+--
+
+DROP TABLE IF EXISTS `illrequestattributes`;
+CREATE TABLE illrequestattributes (
+ illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
+ type varchar(200) NOT NULL, -- API ILL property name
+ value MEDIUMTEXT NOT NULL, -- API ILL property value
+ PRIMARY KEY (`illrequest_id`, `type` (191)),
+ CONSTRAINT `illrequestattributes_ifk`
+ FOREIGN KEY (illrequest_id)
+ REFERENCES `illrequests` (`illrequest_id`)
+ ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
+-- Table structure for table 'library_groups'
+--
+
+DROP TABLE IF EXISTS `library_groups`;
+CREATE TABLE library_groups (
+ id INT(11) NOT NULL auto_increment, -- unique id for each group
+ parent_id INT(11) NULL DEFAULT NULL, -- if this is a child group, the id of the parent group
+ branchcode VARCHAR(10) NULL DEFAULT NULL, -- The branchcode of a branch belonging to the parent group
+ title VARCHAR(100) NULL DEFAULT NULL, -- Short description of the goup
+ description MEDIUMTEXT NULL DEFAULT NULL, -- Longer explanation of the group, if necessary
+ ft_hide_patron_info tinyint(1) NOT NULL DEFAULT 0, -- Turn on the feature "Hide patron's info" for this group
+ ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0, -- Use this group for staff side search groups
+ ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0, -- Use this group for opac side search groups
+ created_on TIMESTAMP NULL, -- Date and time of creation
+ updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Date and time of last
+ PRIMARY KEY id ( id ),
+ FOREIGN KEY (parent_id) REFERENCES library_groups(id) ON UPDATE CASCADE ON DELETE CASCADE,
+ FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON UPDATE CASCADE ON DELETE CASCADE,
+ 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;