Lines 1208-1213
CREATE TABLE `bookings` (
Link Here
|
1208 |
`patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1208 |
`patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1209 |
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1209 |
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1210 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
1210 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
|
|
1211 |
`pickup_library_id` varchar(10) DEFAULT NULL COMMENT 'Identifier for booking pickup library', |
1211 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1212 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1212 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1213 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1213 |
PRIMARY KEY (`booking_id`), |
1214 |
PRIMARY KEY (`booking_id`), |
Lines 1216-1222
CREATE TABLE `bookings` (
Link Here
|
1216 |
KEY `item_id` (`item_id`), |
1217 |
KEY `item_id` (`item_id`), |
1217 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1218 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1218 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1219 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1219 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1220 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
1221 |
CONSTRAINT `bookings_ibfk_4` FOREIGN KEY (`pickup_library_id`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE |
1220 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1222 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1221 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1223 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1222 |
|
1224 |
|
1223 |
- |
|
|