| 37 | | inventory_id INT NOT NULL, |
| 38 | | customer_id INT NOT NULL, |
| 39 | | staff_id INT NOT NULL, |
| 40 | | return_date TIMESTAMP, |
| 41 | | last_update TIMESTAMP DEFAULT now(), |
| 42 | | PRIMARY KEY (rental_id, rental_date) |
| | 37 | inventory_id BIGINT NOT NULL, |
| | 38 | customer_id BIGINT NOT NULL, |
| | 39 | staff_id BIGINT NOT NULL, |
| | 40 | return_date TIMESTAMP, |
| | 41 | last_update TIMESTAMP DEFAULT now() NOT NULL, |
| | 42 | PRIMARY KEY (rental_id, rental_date), |
| | 43 | CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory(inventory_id) ON UPDATE CASCADE ON DELETE RESTRICT, |
| | 44 | CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer(customer_id) ON UPDATE CASCADE ON DELETE RESTRICT, |
| | 45 | CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff(staff_id) ON UPDATE CASCADE ON DELETE RESTRICT |