Lines 3985-3990
CREATE TABLE IF NOT EXISTS clubs (
Link Here
|
3985 |
CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) |
3985 |
CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) |
3986 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3986 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3987 |
|
3987 |
|
|
|
3988 |
-- |
3989 |
-- Table structure for table 'club_holds' |
3990 |
-- |
3991 |
|
3992 |
CREATE TABLE IF NOT EXISTS club_holds ( |
3993 |
id INT(11) NOT NULL AUTO_INCREMENT, |
3994 |
club_id INT(11) NOT NULL, -- id for the club the hold was generated for |
3995 |
biblio_id INT(11) NOT NULL, -- id for the bibliographic record the hold has been placed against |
3996 |
item_id INT(11) NULL DEFAULT NULL, -- If item-level, the id for the item the hold has been placed agains |
3997 |
date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Timestamp for the placed hold |
3998 |
PRIMARY KEY (id), |
3999 |
-- KEY club_id (club_id), |
4000 |
CONSTRAINT clubs_holds_ibfk_1 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE, |
4001 |
CONSTRAINT clubs_holds_ibfk_2 FOREIGN KEY (biblio_id) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, |
4002 |
CONSTRAINT clubs_holds_ibfk_3 FOREIGN KEY (item_id) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE |
4003 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4004 |
|
4005 |
-- |
4006 |
-- Table structure for table 'club_holds_to_patron_holds' |
4007 |
-- |
4008 |
|
4009 |
CREATE TABLE IF NOT EXISTS club_holds_to_patron_holds ( |
4010 |
id INT(11) NOT NULL AUTO_INCREMENT, |
4011 |
club_hold_id INT(11) NOT NULL, |
4012 |
patron_id INT(11) NOT NULL, |
4013 |
hold_id INT(11), |
4014 |
error_code ENUM ( 'damaged', 'ageRestricted', 'itemAlreadyOnHold', |
4015 |
'tooManyHoldsForThisRecord', 'tooManyReservesToday', |
4016 |
'tooManyReserves', 'notReservable', 'cannotReserveFromOtherBranches', |
4017 |
'libraryNotFound', 'libraryNotPickupLocation', 'cannotBeTransferred' |
4018 |
) NULL DEFAULT NULL, |
4019 |
error_message varchar(100) NULL DEFAULT NULL, |
4020 |
PRIMARY KEY (id), |
4021 |
-- KEY club_hold_id (club_hold_id), |
4022 |
CONSTRAINT clubs_holds_paton_holds_ibfk_1 FOREIGN KEY (club_hold_id) REFERENCES club_holds (id) ON DELETE CASCADE ON UPDATE CASCADE, |
4023 |
CONSTRAINT clubs_holds_paton_holds_ibfk_2 FOREIGN KEY (patron_id) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, |
4024 |
CONSTRAINT clubs_holds_paton_holds_ibfk_3 FOREIGN KEY (hold_id) REFERENCES reserves (reserve_id) ON DELETE CASCADE ON UPDATE CASCADE |
4025 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4026 |
|
3988 |
-- |
4027 |
-- |
3989 |
-- Table structure for table 'club_enrollments' |
4028 |
-- Table structure for table 'club_enrollments' |
3990 |
-- |
4029 |
-- |
3991 |
- |
|
|