   `end_date` date NOT NULL,
   PRIMARY KEY (ID)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-   
+
+ALTER TABLE `LTS_Shift`
+  ADD KEY `staff` (`staff`),
+  ADD KEY `staff_2` (`staff`),
+  ADD CONSTRAINT `staffFK` FOREIGN KEY (`staff`) REFERENCES `users` (`username`) ON UPDATE CASCADE;
+
 /* create table LTS_Cover */
 CREATE TABLE `LTS_Covers` (
   `ID` int(4) NOT NULL AUTO_INCREMENT,


ALTER TABLE `lifeguard`
  ADD KEY `staff1` (`staff1`),
  ADD CONSTRAINT `staffFK` FOREIGN KEY (`staff1`) REFERENCES `users` (`username`);
  
/* create table LTS_Shift */
 

  ADD KEY `staff1` (`staff1`),
  ADD KEY `staff2` (`staff2`),
  ADD KEY `staff3` (`staff3`),
  ADD KEY `staff4` (`staff4`),
  ADD CONSTRAINT `staff4FK` FOREIGN KEY (`staff4`) REFERENCES `users` (`username`) ON UPDATE CASCADE,
  ADD CONSTRAINT `staff1FK` FOREIGN KEY (`staff1`) REFERENCES `users` (`username`) ON UPDATE CASCADE,
  ADD CONSTRAINT `staff2FK` FOREIGN KEY (`staff2`) REFERENCES `users` (`username`) ON UPDATE CASCADE,
  ADD CONSTRAINT `staff3FK` FOREIGN KEY (`staff3`) REFERENCES `users` (`username`) ON UPDATE CASCADE;

/* create new user
 change address and password to desired values */
create user 'staff'@'192.168.1.%' identified by 'password';

/* change address to desired value */
grant select, insert, delete, alter on staff.* to 'staff'@'192.168.1.%';