Appointments, account stuff, adopt a pet changes
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
INSERT INTO service (serviceName, serviceDesc, serviceDuration, servicePrice)
|
||||
VALUES ('Pet Adoption', 'Schedule a visit to meet and adopt an available pet', 30, 0.00);
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS appointment_customer_pet (
|
||||
appointment_id BIGINT NOT NULL,
|
||||
customer_pet_id BIGINT NOT NULL,
|
||||
PRIMARY KEY (appointment_id, customer_pet_id),
|
||||
FOREIGN KEY (appointment_id) REFERENCES appointment(appointmentId),
|
||||
FOREIGN KEY (customer_pet_id) REFERENCES customer_pet(customer_pet_id)
|
||||
);
|
||||
11
backend/src/main/resources/db/migration/V9__customer_pet.sql
Normal file
11
backend/src/main/resources/db/migration/V9__customer_pet.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS customer_pet (
|
||||
customer_pet_id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
customer_id BIGINT NOT NULL,
|
||||
pet_name VARCHAR(50) NOT NULL,
|
||||
species VARCHAR(50) NOT NULL,
|
||||
breed VARCHAR(50) NULL,
|
||||
image_url VARCHAR(255) NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (customer_id) REFERENCES customer(customerId)
|
||||
);
|
||||
Reference in New Issue
Block a user