Lines 1186-1192
CREATE TABLE `borrower_debarments` (
Link Here
|
1186 |
`borrower_debarment_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for the restriction', |
1186 |
`borrower_debarment_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for the restriction', |
1187 |
`borrowernumber` int(11) NOT NULL COMMENT 'foreign key for borrowers.borrowernumber for patron who is restricted', |
1187 |
`borrowernumber` int(11) NOT NULL COMMENT 'foreign key for borrowers.borrowernumber for patron who is restricted', |
1188 |
`expiration` date DEFAULT NULL COMMENT 'expiration date of the restriction', |
1188 |
`expiration` date DEFAULT NULL COMMENT 'expiration date of the restriction', |
1189 |
`type` varchar(50) NOT NULL COMMENT 'type of restriction, FK to debarment_types.code', |
1189 |
`type` varchar(50) NOT NULL COMMENT 'type of restriction, FK to restriction_types.code', |
1190 |
`comment` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'comments about the restriction', |
1190 |
`comment` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'comments about the restriction', |
1191 |
`manager_id` int(11) DEFAULT NULL COMMENT 'foreign key for borrowers.borrowernumber for the librarian managing the restriction', |
1191 |
`manager_id` int(11) DEFAULT NULL COMMENT 'foreign key for borrowers.borrowernumber for the librarian managing the restriction', |
1192 |
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', |
1192 |
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', |
Lines 1194-1200
CREATE TABLE `borrower_debarments` (
Link Here
|
1194 |
PRIMARY KEY (`borrower_debarment_id`), |
1194 |
PRIMARY KEY (`borrower_debarment_id`), |
1195 |
KEY `borrowernumber` (`borrowernumber`), |
1195 |
KEY `borrowernumber` (`borrowernumber`), |
1196 |
CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1196 |
CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1197 |
CONSTRAINT `borrower_debarments_ibfk_2` FOREIGN KEY (`type`) REFERENCES `debarment_types` (`code`) ON DELETE NO ACTION ON UPDATE CASCADE |
1197 |
CONSTRAINT `borrower_debarments_ibfk_2` FOREIGN KEY (`type`) REFERENCES `restriction_types` (`code`) ON DELETE NO ACTION ON UPDATE CASCADE |
1198 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1198 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1199 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1199 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1200 |
|
1200 |
|
Lines 2080-2091
CREATE TABLE `collections_tracking` (
Link Here
|
2080 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2080 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2081 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2081 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2082 |
|
2082 |
|
2083 |
DROP TABLE IF EXISTS `debarment_types`; |
2083 |
DROP TABLE IF EXISTS `restriction_types`; |
2084 |
CREATE TABLE debarment_types ( |
2084 |
CREATE TABLE `restriction_types` ( |
2085 |
code varchar(50) NOT NULL PRIMARY KEY, |
2085 |
`code` varchar(50) NOT NULL, |
2086 |
display_text text NOT NULL, |
2086 |
`display_text` text NOT NULL, |
2087 |
is_system tinyint(1) NOT NULL DEFAULT 0, |
2087 |
`is_system` tinyint(1) NOT NULL DEFAULT 0, |
2088 |
is_default tinyint(1) NOT NULL DEFAULT 0 |
2088 |
`is_default` tinyint(1) NOT NULL DEFAULT 0, |
|
|
2089 |
PRIMARY KEY (`code`) |
2089 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2090 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2090 |
|
2091 |
|
2091 |
-- |
2092 |
-- |
2092 |
- |
|
|