Lines 1067-1072
CREATE TABLE `biblioitems` (
Link Here
|
1067 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1067 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1068 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1068 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1069 |
|
1069 |
|
|
|
1070 |
-- |
1071 |
-- Table structure for table `bookings` |
1072 |
-- |
1073 |
|
1074 |
DROP TABLE IF EXISTS `bookings`; |
1075 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
1076 |
/*!40101 SET character_set_client = utf8 */; |
1077 |
CREATE TABLE `bookings` ( |
1078 |
`booking_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', |
1079 |
`borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this booking is for', |
1080 |
`biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this booking is on', |
1081 |
`itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed a booking for', |
1082 |
`start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking', |
1083 |
`end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking', |
1084 |
PRIMARY KEY (`booking_id`), |
1085 |
KEY `borrowernumber` (`borrowernumber`), |
1086 |
KEY `biblionumber` (`biblionumber`), |
1087 |
KEY `itemnumber` (`itemnumber`), |
1088 |
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1089 |
CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1090 |
CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1091 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1092 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1093 |
|
1070 |
-- |
1094 |
-- |
1071 |
-- Table structure for table `borrower_attribute_types` |
1095 |
-- Table structure for table `borrower_attribute_types` |
1072 |
-- |
1096 |
-- |
1073 |
- |
|
|