|
Last change
on this file was 92e7c7a, checked in by veronika-ils <ilioskaveronika@…>, 8 hours ago |
|
Petify fullstack project
|
-
Property mode
set to
100644
|
|
File size:
494 bytes
|
| Line | |
|---|
| 1 | CREATE TABLE IF NOT EXISTS clinic_unavailable_slots (
|
|---|
| 2 | slot_id BIGSERIAL,
|
|---|
| 3 | clinic_id BIGINT NOT NULL,
|
|---|
| 4 | date_time TIMESTAMP NOT NULL,
|
|---|
| 5 | reason TEXT,
|
|---|
| 6 | created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|---|
| 7 | CONSTRAINT clinic_unavailable_slots_PK PRIMARY KEY (slot_id),
|
|---|
| 8 | CONSTRAINT clinic_unavailable_slots_clinic_FK FOREIGN KEY (clinic_id)
|
|---|
| 9 | REFERENCES vet_clinics(clinic_id)
|
|---|
| 10 | ON DELETE RESTRICT,
|
|---|
| 11 | CONSTRAINT clinic_unavailable_slots_UQ UNIQUE (clinic_id, date_time)
|
|---|
| 12 | );
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.