Postgres ****Constraints****


```typeALTER TABLE public.reservationsADD CONSTRAINT reservations_room_id_fkeyFOREIGN KEY (room_id) REFERENCES public.rooms(id);ALTER TABLE public.reservations ADD CONSTRAINT reservations_user_id_fkeyFOREIGN KEY (user_id) REFERENCES public.users(id);```
```typeALTER TABLE public.reservationsADD CONSTRAINT daytime_check check (start_time::time >= '08:00:00'AND end_time::time <= '17:00:00')```


### **Constraints**
> [Postgres Constraints for Newbies](https://blog.crunchydata.com/blog/postgres-constraints-for-newbies)





