Lines 4007-4012
CREATE TABLE IF NOT EXISTS clubs (
Link Here
|
4007 |
CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) |
4007 |
CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) |
4008 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4008 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4009 |
|
4009 |
|
|
|
4010 |
-- |
4011 |
-- Table structure for table 'club_holds' |
4012 |
-- |
4013 |
|
4014 |
CREATE TABLE IF NOT EXISTS club_holds ( |
4015 |
id INT(11) NOT NULL AUTO_INCREMENT, |
4016 |
club_id INT(11) NOT NULL, -- id for the club the hold was generated for |
4017 |
biblio_id INT(11) NOT NULL, -- id for the bibliographic record the hold has been placed against |
4018 |
item_id INT(11) NULL DEFAULT NULL, -- If item-level, the id for the item the hold has been placed agains |
4019 |
date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Timestamp for the placed hold |
4020 |
PRIMARY KEY (id), |
4021 |
-- KEY club_id (club_id), |
4022 |
CONSTRAINT clubs_holds_ibfk_1 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE, |
4023 |
CONSTRAINT clubs_holds_ibfk_2 FOREIGN KEY (biblio_id) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, |
4024 |
CONSTRAINT clubs_holds_ibfk_3 FOREIGN KEY (item_id) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE |
4025 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4026 |
|
4027 |
-- |
4028 |
-- Table structure for table 'club_holds_to_patron_holds' |
4029 |
-- |
4030 |
|
4031 |
CREATE TABLE IF NOT EXISTS club_holds_to_patron_holds ( |
4032 |
id INT(11) NOT NULL AUTO_INCREMENT, |
4033 |
club_hold_id INT(11) NOT NULL, |
4034 |
patron_id INT(11) NOT NULL, |
4035 |
hold_id INT(11), |
4036 |
error_code ENUM ( 'damaged', 'ageRestricted', 'itemAlreadyOnHold', |
4037 |
'tooManyHoldsForThisRecord', 'tooManyReservesToday', |
4038 |
'tooManyReserves', 'notReservable', 'cannotReserveFromOtherBranches', |
4039 |
'libraryNotFound', 'libraryNotPickupLocation', 'cannotBeTransferred' |
4040 |
) NULL DEFAULT NULL, |
4041 |
error_message varchar(100) NULL DEFAULT NULL, |
4042 |
PRIMARY KEY (id), |
4043 |
-- KEY club_hold_id (club_hold_id), |
4044 |
CONSTRAINT clubs_holds_paton_holds_ibfk_1 FOREIGN KEY (club_hold_id) REFERENCES club_holds (id) ON DELETE CASCADE ON UPDATE CASCADE, |
4045 |
CONSTRAINT clubs_holds_paton_holds_ibfk_2 FOREIGN KEY (patron_id) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, |
4046 |
CONSTRAINT clubs_holds_paton_holds_ibfk_3 FOREIGN KEY (hold_id) REFERENCES reserves (reserve_id) ON DELETE CASCADE ON UPDATE CASCADE |
4047 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4048 |
|
4010 |
-- |
4049 |
-- |
4011 |
-- Table structure for table 'club_enrollments' |
4050 |
-- Table structure for table 'club_enrollments' |
4012 |
-- |
4051 |
-- |
4013 |
- |
|
|