Lines 1224-1229
CREATE TABLE `bookings` (
Link Here
|
1224 |
`patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1224 |
`patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1225 |
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1225 |
`biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1226 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
1226 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
|
|
1227 |
`pickup_library_id` varchar(10) DEFAULT NULL COMMENT 'Identifier for booking pickup library', |
1227 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1228 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1228 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1229 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1229 |
PRIMARY KEY (`booking_id`), |
1230 |
PRIMARY KEY (`booking_id`), |
Lines 1232-1238
CREATE TABLE `bookings` (
Link Here
|
1232 |
KEY `item_id` (`item_id`), |
1233 |
KEY `item_id` (`item_id`), |
1233 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1234 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1234 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1235 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1235 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1236 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
1237 |
CONSTRAINT `bookings_ibfk_4` FOREIGN KEY (`pickup_library_id`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE |
1236 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1238 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1237 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1239 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1238 |
|
1240 |
|
1239 |
- |
|
|