Lines 1154-1159
CREATE TABLE `biblioitems` (
Link Here
|
1154 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1154 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1155 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1155 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1156 |
|
1156 |
|
|
|
1157 |
-- |
1158 |
-- Table structure for table `bookings` |
1159 |
-- |
1160 |
|
1161 |
DROP TABLE IF EXISTS `bookings`; |
1162 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
1163 |
/*!40101 SET character_set_client = utf8 */; |
1164 |
CREATE TABLE `bookings` ( |
1165 |
`booking_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', |
1166 |
`patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1167 |
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1168 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
1169 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1170 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1171 |
PRIMARY KEY (`booking_id`), |
1172 |
KEY `patron_id` (`patron_id`), |
1173 |
KEY `biblio_id` (`biblio_id`), |
1174 |
KEY `item_id` (`item_id`), |
1175 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1176 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1177 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1178 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1179 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1180 |
|
1157 |
-- |
1181 |
-- |
1158 |
-- Table structure for table `borrower_attribute_types` |
1182 |
-- Table structure for table `borrower_attribute_types` |
1159 |
-- |
1183 |
-- |
1160 |
- |
|
|