From 9f82c403098bb96acd8b7116f84416d3b4643b57 Mon Sep 17 00:00:00 2001
From: lucashemi <lucasxberger@gmail.com>
Date: Fri, 24 Feb 2023 16:14:01 -0300
Subject: api-appointments

---
 .../resources/db/migration/V7__create-table-appointments.sql | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 api/src/main/resources/db/migration/V7__create-table-appointments.sql

(limited to 'api/src/main/resources/db/migration/V7__create-table-appointments.sql')

diff --git a/api/src/main/resources/db/migration/V7__create-table-appointments.sql b/api/src/main/resources/db/migration/V7__create-table-appointments.sql
new file mode 100644
index 0000000..388810c
--- /dev/null
+++ b/api/src/main/resources/db/migration/V7__create-table-appointments.sql
@@ -0,0 +1,12 @@
+create table appointments
+(
+    id    bigint not null auto_increment,
+    doctor_id bigint not null,
+    patient_id bigint not null,
+    date datetime not null,
+
+    primary key (id),
+    constraint fk_appointments_doctor_id foreign key(doctor_id) references doctors(id),
+    constraint fk_appointments_patient_id foreign key(patient_id) references patients(id)
+
+);
\ No newline at end of file
-- 
cgit v1.2.3-18-g5258

