Lines 1184-1197
CREATE TABLE `borrower_debarments` (
Link Here
|
1184 |
`borrower_debarment_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for the restriction', |
1184 |
`borrower_debarment_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for the restriction', |
1185 |
`borrowernumber` int(11) NOT NULL COMMENT 'foreign key for borrowers.borrowernumber for patron who is restricted', |
1185 |
`borrowernumber` int(11) NOT NULL COMMENT 'foreign key for borrowers.borrowernumber for patron who is restricted', |
1186 |
`expiration` date DEFAULT NULL COMMENT 'expiration date of the restriction', |
1186 |
`expiration` date DEFAULT NULL COMMENT 'expiration date of the restriction', |
1187 |
`type` enum('SUSPENSION','OVERDUES','MANUAL','DISCHARGE') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'MANUAL' COMMENT 'type of restriction', |
1187 |
`type` varchar(50) NOT NULL COMMENT 'type of restriction, FK to debarment_types.code', |
1188 |
`comment` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'comments about the restriction', |
1188 |
`comment` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'comments about the restriction', |
1189 |
`manager_id` int(11) DEFAULT NULL COMMENT 'foreign key for borrowers.borrowernumber for the librarian managing the restriction', |
1189 |
`manager_id` int(11) DEFAULT NULL COMMENT 'foreign key for borrowers.borrowernumber for the librarian managing the restriction', |
1190 |
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', |
1190 |
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', |
1191 |
`updated` timestamp NULL DEFAULT NULL COMMENT 'date the restriction was updated', |
1191 |
`updated` timestamp NULL DEFAULT NULL COMMENT 'date the restriction was updated', |
1192 |
PRIMARY KEY (`borrower_debarment_id`), |
1192 |
PRIMARY KEY (`borrower_debarment_id`), |
1193 |
KEY `borrowernumber` (`borrowernumber`), |
1193 |
KEY `borrowernumber` (`borrowernumber`), |
1194 |
CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1194 |
CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
1195 |
CONSTRAINT `borrower_debarments_ibfk_2` FOREIGN KEY (`type`) REFERENCES `debarment_types` (`code`) ON DELETE NO ACTION ON UPDATE CASCADE |
1195 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1196 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1196 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1197 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1197 |
|
1198 |
|
Lines 2026-2031
CREATE TABLE `collections_tracking` (
Link Here
|
2026 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2027 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2027 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2028 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2028 |
|
2029 |
|
|
|
2030 |
DROP TABLE IF EXISTS `debarment_types`; |
2031 |
CREATE TABLE debarment_types ( |
2032 |
code varchar(50) NOT NULL PRIMARY KEY, |
2033 |
display_text text NOT NULL, |
2034 |
ronly tinyint(1) NOT NULL DEFAULT 0, |
2035 |
dflt tinyint(1) NOT NULL DEFAULT 0 |
2036 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2037 |
|
2029 |
-- |
2038 |
-- |
2030 |
-- Table structure for table `columns_settings` |
2039 |
-- Table structure for table `columns_settings` |
2031 |
-- |
2040 |
-- |
2032 |
- |
|
|