diff options
Diffstat (limited to 'api/src/main/resources/db/migration')
3 files changed, 14 insertions, 0 deletions
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 diff --git a/api/src/main/resources/db/migration/V8__alter-table-appointments-add-column-reason-for-cancellation.sql b/api/src/main/resources/db/migration/V8__alter-table-appointments-add-column-reason-for-cancellation.sql new file mode 100644 index 0000000..b1b3fde --- /dev/null +++ b/api/src/main/resources/db/migration/V8__alter-table-appointments-add-column-reason-for-cancellation.sql @@ -0,0 +1 @@ +alter table appointments add column reason_for_cancellation varchar(100);
\ No newline at end of file diff --git a/api/src/main/resources/db/migration/V9__alter-table-appointments-add-column-active.sql b/api/src/main/resources/db/migration/V9__alter-table-appointments-add-column-active.sql new file mode 100644 index 0000000..b02bda9 --- /dev/null +++ b/api/src/main/resources/db/migration/V9__alter-table-appointments-add-column-active.sql @@ -0,0 +1 @@ +alter table appointments add column active tinyint;
\ No newline at end of file |
