From 58a48215da2561ca4f00936354d735a5b6ff752a Mon Sep 17 00:00:00 2001 From: Harkamal Randhawa Date: Sun, 19 Apr 2026 17:42:30 -0600 Subject: [PATCH] flatten flyway migrations --- .../backend/config/DataInitializer.java | 15 ++ backend/src/main/resources/application.yml | 1 + .../db/migration/V1__target_baseline.sql | 7 +- .../resources/db/migration/V2__seed_data.sql | 243 +++++++++++++++++- .../V3__nullable_appointment_petid.sql | 3 - .../V4__drop_purchase_order_status.sql | 1 - .../db/migration/V5__seed_data_2026.sql | 87 ------- .../db/migration/V6__unique_constraints.sql | 1 - .../db/migration/V7__fix_service_species.sql | 14 - .../db/migration/V8__seed_activity_logs.sql | 90 ------- .../db/migration/V9__seed_recent_sales.sql | 51 ---- 11 files changed, 261 insertions(+), 252 deletions(-) delete mode 100644 backend/src/main/resources/db/migration/V3__nullable_appointment_petid.sql delete mode 100644 backend/src/main/resources/db/migration/V4__drop_purchase_order_status.sql delete mode 100644 backend/src/main/resources/db/migration/V5__seed_data_2026.sql delete mode 100644 backend/src/main/resources/db/migration/V6__unique_constraints.sql delete mode 100644 backend/src/main/resources/db/migration/V7__fix_service_species.sql delete mode 100644 backend/src/main/resources/db/migration/V8__seed_activity_logs.sql delete mode 100644 backend/src/main/resources/db/migration/V9__seed_recent_sales.sql diff --git a/backend/src/main/java/com/petshop/backend/config/DataInitializer.java b/backend/src/main/java/com/petshop/backend/config/DataInitializer.java index 9809ddc6..89cbb18e 100644 --- a/backend/src/main/java/com/petshop/backend/config/DataInitializer.java +++ b/backend/src/main/java/com/petshop/backend/config/DataInitializer.java @@ -34,6 +34,7 @@ public class DataInitializer implements CommandLineRunner { admin.setPhone("000-000-1000"); admin.setRole(User.Role.ADMIN); admin.setActive(true); + admin.setAvatarUrl("/uploads/avatars/001.webp"); userRepository.save(admin); System.out.println("Admin user created successfully"); } else { @@ -67,6 +68,10 @@ public class DataInitializer implements CommandLineRunner { admin.setRole(User.Role.ADMIN); updated = true; } + if (admin.getAvatarUrl() == null || admin.getAvatarUrl().isEmpty()) { + admin.setAvatarUrl("/uploads/avatars/001.webp"); + updated = true; + } if (updated) { userRepository.save(admin); System.out.println("Admin user normalized"); @@ -86,6 +91,7 @@ public class DataInitializer implements CommandLineRunner { staff.setPhone("000-000-1001"); staff.setRole(User.Role.STAFF); staff.setActive(true); + staff.setAvatarUrl("/uploads/avatars/003.webp"); userRepository.save(staff); System.out.println("Staff user created successfully"); } else { @@ -119,6 +125,10 @@ public class DataInitializer implements CommandLineRunner { staff.setRole(User.Role.STAFF); updated = true; } + if (staff.getAvatarUrl() == null || staff.getAvatarUrl().isEmpty()) { + staff.setAvatarUrl("/uploads/avatars/003.webp"); + updated = true; + } if (updated) { userRepository.save(staff); System.out.println("Staff user normalized"); @@ -138,6 +148,7 @@ public class DataInitializer implements CommandLineRunner { customer.setPhone("000-000-1002"); customer.setRole(User.Role.CUSTOMER); customer.setActive(true); + customer.setAvatarUrl("/uploads/avatars/015.webp"); userRepository.save(customer); System.out.println("Customer user created successfully"); } else { @@ -171,6 +182,10 @@ public class DataInitializer implements CommandLineRunner { customer.setRole(User.Role.CUSTOMER); updated = true; } + if (customer.getAvatarUrl() == null || customer.getAvatarUrl().isEmpty()) { + customer.setAvatarUrl("/uploads/avatars/015.webp"); + updated = true; + } if (updated) { userRepository.save(customer); System.out.println("Customer user normalized"); diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 20773f86..21d7f6d4 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -40,6 +40,7 @@ spring: flyway: enabled: ${FLYWAY_ENABLED:false} + validate-on-migrate: false server: port: ${SERVER_PORT:8080} diff --git a/backend/src/main/resources/db/migration/V1__target_baseline.sql b/backend/src/main/resources/db/migration/V1__target_baseline.sql index bc064913..6f03cf58 100644 --- a/backend/src/main/resources/db/migration/V1__target_baseline.sql +++ b/backend/src/main/resources/db/migration/V1__target_baseline.sql @@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS users ( firstName VARCHAR(50) NOT NULL, lastName VARCHAR(50) NOT NULL, fullName VARCHAR(100) NULL, - phone VARCHAR(20) NULL, + phone VARCHAR(20) NULL UNIQUE, avatarUrl VARCHAR(255) NULL, role VARCHAR(20) NOT NULL, staffRole VARCHAR(50) NULL, @@ -108,7 +108,6 @@ CREATE TABLE IF NOT EXISTS purchaseOrder ( supId BIGINT NOT NULL, storeId BIGINT NOT NULL, orderDate DATE NOT NULL, - status VARCHAR(50) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, CONSTRAINT fk_purchase_order_supplier FOREIGN KEY (supId) REFERENCES supplier(supId), @@ -150,7 +149,7 @@ CREATE TABLE IF NOT EXISTS pet ( CREATE TABLE IF NOT EXISTS appointment ( appointmentId BIGINT AUTO_INCREMENT PRIMARY KEY, serviceId BIGINT NOT NULL, - petId BIGINT NOT NULL, + petId BIGINT NULL, customerId BIGINT NOT NULL, storeId BIGINT NOT NULL, employeeId BIGINT NOT NULL, @@ -160,7 +159,7 @@ CREATE TABLE IF NOT EXISTS appointment ( created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, CONSTRAINT fk_appointment_service FOREIGN KEY (serviceId) REFERENCES service(serviceId), - CONSTRAINT fk_appointment_pet FOREIGN KEY (petId) REFERENCES pet(petId), + CONSTRAINT fk_appointment_pet FOREIGN KEY (petId) REFERENCES pet(petId) ON DELETE SET NULL, CONSTRAINT fk_appointment_customer FOREIGN KEY (customerId) REFERENCES users(id), CONSTRAINT fk_appointment_store FOREIGN KEY (storeId) REFERENCES storeLocation(storeId), CONSTRAINT fk_appointment_employee FOREIGN KEY (employeeId) REFERENCES users(id) diff --git a/backend/src/main/resources/db/migration/V2__seed_data.sql b/backend/src/main/resources/db/migration/V2__seed_data.sql index 88d3835b..befa56fa 100644 --- a/backend/src/main/resources/db/migration/V2__seed_data.sql +++ b/backend/src/main/resources/db/migration/V2__seed_data.sql @@ -204,11 +204,14 @@ INSERT INTO service_species (serviceId, species) VALUES (2, 'Rabbit'), (2, 'Guinea Pig'), (2, 'Hamster'), -(2, 'Bird'), +(2, 'Reptile'), +(2, 'Other'), (3, 'Dog'), (3, 'Cat'), (3, 'Rabbit'), (3, 'Guinea Pig'), +(3, 'Reptile'), +(3, 'Other'), (4, 'Dog'), (4, 'Cat'), (4, 'Rabbit'), @@ -216,11 +219,18 @@ INSERT INTO service_species (serviceId, species) VALUES (4, 'Fish'), (4, 'Hamster'), (4, 'Guinea Pig'), +(4, 'Reptile'), +(4, 'Other'), (5, 'Dog'), (5, 'Cat'), (5, 'Rabbit'), (5, 'Guinea Pig'), (5, 'Hamster'), +(5, 'Reptile'), +(5, 'Other'), +(1, 'Guinea Pig'), +(1, 'Hamster'), +(1, 'Other'), (6, 'Bird'), (7, 'Bird'), (8, 'Fish'); @@ -2247,3 +2257,234 @@ WHERE imageUrl LIKE 'https://images.petshop.local/products/%'; UPDATE storeLocation SET imageUrl = REPLACE(imageUrl, 'https://images.petshop.local/stores/', '/stores/') WHERE imageUrl LIKE 'https://images.petshop.local/stores/%'; + +INSERT IGNORE INTO appointment (appointmentId, serviceId, petId, customerId, storeId, employeeId, appointmentDate, appointmentTime, appointmentStatus) VALUES +(91, 1, NULL, 16, 1, 3, '2026-03-08', '09:00:00', 'COMPLETED'), +(92, 2, NULL, 17, 2, 8, '2026-03-10', '10:30:00', 'COMPLETED'), +(93, 3, NULL, 18, 3, 13, '2026-03-12', '13:00:00', 'MISSED'), +(94, 4, NULL, 19, 1, 6, '2026-03-14', '14:30:00', 'COMPLETED'), +(95, 5, NULL, 20, 2, 7, '2026-03-16', '09:00:00', 'COMPLETED'), +(96, 6, NULL, 21, 3, 12, '2026-03-18', '10:30:00', 'COMPLETED'), +(97, 7, NULL, 22, 1, 5, '2026-03-20', '13:00:00', 'CANCELLED'), +(98, 8, NULL, 23, 2, 10, '2026-03-22', '14:30:00', 'COMPLETED'), +(99, 1, NULL, 24, 3, 11, '2026-03-24', '09:00:00', 'COMPLETED'), +(100, 2, NULL, 25, 1, 4, '2026-03-26', '10:30:00', 'MISSED'), +(101, 3, NULL, 26, 2, 9, '2026-03-28', '13:00:00', 'COMPLETED'), +(102, 4, NULL, 27, 3, 14, '2026-03-30', '14:30:00', 'COMPLETED'), +(103, 5, NULL, 28, 1, 3, '2026-04-01', '09:00:00', 'COMPLETED'), +(104, 6, NULL, 29, 2, 8, '2026-04-03', '10:30:00', 'COMPLETED'), +(105, 7, NULL, 30, 3, 13, '2026-04-05', '13:00:00', 'MISSED'), +(106, 8, NULL, 31, 1, 6, '2026-04-07', '14:30:00', 'COMPLETED'), +(107, 1, NULL, 32, 2, 7, '2026-04-09', '09:00:00', 'COMPLETED'), +(108, 2, NULL, 33, 3, 12, '2026-04-11', '10:30:00', 'CANCELLED'), +(109, 3, NULL, 34, 1, 5, '2026-04-13', '13:00:00', 'COMPLETED'), +(110, 4, NULL, 35, 2, 10, '2026-04-15', '10:00:00', 'SCHEDULED'), +(111, 5, NULL, 36, 3, 11, '2026-04-16', '14:00:00', 'SCHEDULED'); + +INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES +(111, '2026-03-08 09:15:00', 87.50, 'Cash', 3, 1, 3, 0, NULL, 'IN_STORE', NULL, NULL, 87.50, 0.00, 0.00, 8), +(112, '2026-03-09 10:22:00', 145.20, 'Card', 8, 2, 4, 0, NULL, 'IN_STORE', NULL, NULL, 145.20, 0.00, 0.00, 14), +(113, '2026-03-10 11:33:00', 63.75, 'Cash', 13, 3, 5, 0, NULL, 'IN_STORE', NULL, NULL, 63.75, 0.00, 0.00, 6), +(114, '2026-03-11 12:44:00', 210.00, 'Card', 6, 1, 6, 0, NULL, 'ONLINE', NULL, NULL, 210.00, 0.00, 0.00, 21), +(115, '2026-03-12 13:55:00', 38.90, 'Cash', 7, 2, 7, 0, NULL, 'IN_STORE', NULL, NULL, 38.90, 0.00, 0.00, 3), +(116, '2026-03-14 09:10:00', 325.40, 'Card', 12, 3, 8, 0, NULL, 'ONLINE', NULL, NULL, 325.40, 0.00, 0.00, 32), +(117, '2026-03-16 10:25:00', 72.15, 'Cash', 5, 1, 9, 0, NULL, 'IN_STORE', NULL, NULL, 72.15, 0.00, 0.00, 7), +(118, '2026-03-18 11:40:00', 190.80, 'Card', 10, 2, 10, 0, NULL, 'ONLINE', NULL, NULL, 190.80, 0.00, 0.00, 19), +(119, '2026-03-20 12:55:00', 55.30, 'Cash', 11, 3, 11, 0, NULL, 'IN_STORE', NULL, NULL, 55.30, 0.00, 0.00, 5), +(120, '2026-03-22 14:10:00', 412.60, 'Card', 4, 1, 12, 0, NULL, 'ONLINE', NULL, NULL, 412.60, 0.00, 0.00, 41), +(121, '2026-03-24 09:30:00', 98.45, 'Cash', 9, 2, 13, 0, NULL, 'IN_STORE', NULL, NULL, 98.45, 0.00, 0.00, 9), +(122, '2026-03-26 10:45:00', 167.70, 'Card', 14, 3, 14, 0, NULL, 'ONLINE', NULL, NULL, 167.70, 0.00, 0.00, 16), +(123, '2026-03-28 12:00:00', 44.20, 'Cash', 3, 1, 15, 0, NULL, 'IN_STORE', NULL, NULL, 44.20, 0.00, 0.00, 4), +(124, '2026-03-30 13:15:00', 289.55, 'Card', 8, 2, 16, 0, NULL, 'ONLINE', NULL, NULL, 289.55, 0.00, 0.00, 28), +(125, '2026-04-01 09:20:00', 76.80, 'Cash', 13, 3, 17, 0, NULL, 'IN_STORE', NULL, NULL, 76.80, 0.00, 0.00, 7), +(126, '2026-04-03 10:35:00', 234.10, 'Card', 6, 1, 18, 0, NULL, 'ONLINE', NULL, NULL, 234.10, 0.00, 0.00, 23), +(127, '2026-04-05 11:50:00', 52.40, 'Cash', 7, 2, 19, 0, NULL, 'IN_STORE', NULL, NULL, 52.40, 0.00, 0.00, 5), +(128, '2026-04-07 13:05:00', 178.90, 'Card', 12, 3, 20, 0, NULL, 'ONLINE', NULL, NULL, 178.90, 0.00, 0.00, 17), +(129, '2026-04-09 09:15:00', 115.60, 'Cash', 5, 1, 21, 0, NULL, 'IN_STORE', NULL, NULL, 115.60, 0.00, 0.00, 11), +(130, '2026-04-11 10:30:00', 367.25, 'Card', 10, 2, 22, 0, NULL, 'ONLINE', NULL, NULL, 367.25, 0.00, 0.00, 36), +(131, '2026-04-14 11:45:00', 89.70, 'Cash', 11, 3, 23, 0, NULL, 'IN_STORE', NULL, NULL, 89.70, 0.00, 0.00, 8), +(132, '2026-04-15 09:00:00', 145.30, 'Card', 4, 1, 24, 0, NULL, 'ONLINE', NULL, NULL, 145.30, 0.00, 0.00, 14), +(133, '2026-04-16 10:00:00', 78.60, 'Cash', 9, 2, 25, 0, NULL, 'IN_STORE', NULL, NULL, 78.60, 0.00, 0.00, 7); + +INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES +(226, 111, 5, 2, 25.50), +(227, 111, 18, 1, 36.50), +(228, 112, 22, 3, 29.80), +(229, 112, 7, 1, 55.80), +(230, 113, 11, 1, 43.75), +(231, 113, 3, 1, 20.00), +(232, 114, 15, 4, 40.00), +(233, 114, 29, 1, 50.00), +(234, 115, 8, 1, 38.90), +(235, 116, 20, 2, 95.00), +(236, 116, 33, 1, 135.40), +(237, 117, 6, 1, 72.15), +(238, 118, 14, 3, 45.00), +(239, 118, 25, 1, 55.80), +(240, 119, 9, 1, 55.30), +(241, 120, 17, 2, 125.00), +(242, 120, 31, 1, 162.60), +(243, 121, 2, 2, 35.50), +(244, 121, 10, 1, 27.45), +(245, 122, 23, 2, 58.50), +(246, 122, 36, 1, 50.70), +(247, 123, 4, 1, 44.20), +(248, 124, 19, 3, 65.00), +(249, 124, 28, 1, 94.55), +(250, 125, 12, 1, 76.80), +(251, 126, 16, 2, 80.00), +(252, 126, 27, 1, 74.10), +(253, 127, 7, 1, 52.40), +(254, 128, 21, 2, 65.00), +(255, 128, 32, 1, 48.90), +(256, 129, 13, 2, 47.80), +(257, 129, 1, 1, 20.00), +(258, 130, 24, 3, 80.00), +(259, 130, 37, 1, 127.25), +(260, 131, 6, 1, 89.70), +(261, 132, 15, 2, 55.00), +(262, 132, 29, 1, 35.30), +(263, 133, 8, 1, 78.60); + +INSERT INTO activityLog (userId, storeId, usernameSnapshot, fullNameSnapshot, roleSnapshot, storeNameSnapshot, activity, logTimestamp) VALUES +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 08:02:11'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-01-15 08:15:44'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new product | POST /api/v1/products → 201', '2026-01-15 08:31:07'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 09:00:00'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 09:04:22'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 10:12:33'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-01-15 10:18:05'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-01-15 10:25:50'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Updated appointment #12 | PUT /api/v1/appointments/12 → 200', '2026-01-16 11:05:30'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-17 07:58:44'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated pet #8 | PUT /api/v1/pets/8 → 200', '2026-01-17 08:10:19'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-20 09:01:55'), +(16, NULL,'alex.brown', 'Alex Brown', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-20 14:30:22'), +(16, NULL,'alex.brown', 'Alex Brown', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-01-20 14:45:08'), +(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-22 08:55:00'), +(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Updated pet #14 | PUT /api/v1/pets/14 → 200', '2026-01-22 09:20:17'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-25 08:00:00'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new service | POST /api/v1/services → 201', '2026-01-25 08:22:41'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new employee | POST /api/v1/employees → 201', '2026-01-25 09:05:14'), +(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-28 18:30:00'), +(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-01-28 18:35:12'), +(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Updated their profile | PUT /api/v1/auth/me → 200', '2026-01-28 18:40:55'), +(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-03 09:00:00'), +(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-02-03 10:15:38'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-05 07:50:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Deleted pet #3 | DELETE /api/v1/pets/3 → 200', '2026-02-05 08:05:33'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated product #22 | PUT /api/v1/products/22 → 200', '2026-02-05 08:30:44'), +(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-07 12:00:00'), +(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-02-07 12:08:17'), +(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Applied a coupon to cart | POST /api/v1/cart/apply-coupon → 200', '2026-02-07 12:12:05'), +(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-02-07 12:20:30'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-10 09:00:00'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Created a new appointment | POST /api/v1/appointments → 201', '2026-02-10 09:30:22'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Updated appointment #25 | PUT /api/v1/appointments/25 → 200', '2026-02-10 11:45:09'), +(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-14 15:00:00'), +(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Started a new chat conversation | POST /api/v1/chat/conversations → 201','2026-02-14 15:05:44'), +(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Sent a chat message | POST /api/v1/chat/conversations/5/messages → 201', '2026-02-14 15:08:22'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-17 09:00:00'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Uploaded image for pet #31 | POST /api/v1/pets/31/image → 200', '2026-02-17 09:25:11'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-20 08:00:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-02-20 08:20:35'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated user #18 | PUT /api/v1/users/18 → 200', '2026-02-20 09:10:00'), +(20, NULL,'alex.anderson', 'Alex Anderson', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-22 19:00:00'), +(20, NULL,'alex.anderson', 'Alex Anderson', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-02-22 19:15:40'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-01 09:00:00'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-01 10:30:15'), +(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Updated appointment #33 | PUT /api/v1/appointments/33 → 200', '2026-03-01 14:05:22'), +(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-05 11:00:00'), +(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-03-05 11:10:30'), +(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Started checkout | POST /api/v1/cart/checkout → 200', '2026-03-05 11:18:44'), +(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-05 11:22:17'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-08 08:00:00'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Deleted multiple pets | POST /api/v1/pets/bulk-delete → 200', '2026-03-08 08:30:00'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-10 09:00:00'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-10 10:45:33'), +(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-12 16:00:00'), +(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-03-12 16:05:22'), +(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Updated their profile | PUT /api/v1/auth/me → 200', '2026-03-12 16:20:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-15 07:55:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new product | POST /api/v1/products → 201', '2026-03-15 08:10:45'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated product #35 | PUT /api/v1/products/35 → 200', '2026-03-15 08:40:12'), +(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-18 09:00:00'), +(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Updated appointment #45 | PUT /api/v1/appointments/45 → 200', '2026-03-18 09:35:08'), +(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-20 20:00:00'), +(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Started a new chat conversation | POST /api/v1/chat/conversations → 201','2026-03-20 20:05:30'), +(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Sent a chat message | POST /api/v1/chat/conversations/9/messages → 201', '2026-03-20 20:08:11'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-24 09:00:00'), +(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Created a new appointment | POST /api/v1/appointments → 201', '2026-03-24 09:20:44'), +(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-27 09:00:00'), +(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Updated appointment #52 | PUT /api/v1/appointments/52 → 200', '2026-03-27 10:10:19'), +(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-27 11:30:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-01 08:00:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-04-01 08:15:00'), +(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated user #25 | PUT /api/v1/users/25 → 200', '2026-04-01 09:00:22'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-05 10:00:00'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-05 10:15:00'), +(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-05 10:25:44'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-07 09:00:00'), +(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Updated pet #47 | PUT /api/v1/pets/47 → 200', '2026-04-07 09:40:55'), +(24, NULL,'alex.scott', 'Alex Scott', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-09 17:00:00'), +(24, NULL,'alex.scott', 'Alex Scott', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-04-09 17:20:33'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-12 08:00:00'), +(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new service | POST /api/v1/services → 201', '2026-04-12 08:25:18'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-14 09:00:00'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-14 10:55:30'), +(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Updated appointment #60 | PUT /api/v1/appointments/60 → 200', '2026-04-14 14:20:00'), +(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-15 11:00:00'), +(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-15 11:10:22'), +(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-04-15 11:30:00'); + +INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES +(134, '2026-04-10 09:15:00', 57.67, 'Cash', 4, 1, 16, 0, NULL, 'IN_STORE', NULL, NULL, 57.67, 0.00, 0.00, 5), +(135, '2026-04-10 11:30:00', 143.55, 'Card', 8, 2, 17, 0, NULL, 'ONLINE', NULL, NULL, 143.55, 0.00, 0.00, 14), +(136, '2026-04-10 14:45:00', 50.09, 'Cash', 12, 3, 18, 0, NULL, 'IN_STORE', NULL, NULL, 50.09, 0.00, 0.00, 5), +(137, '2026-04-11 10:00:00', 114.48, 'Card', 5, 1, 19, 0, NULL, 'ONLINE', NULL, NULL, 114.48, 0.00, 0.00, 11), +(138, '2026-04-11 13:20:00', 93.55, 'Cash', 9, 2, 20, 0, NULL, 'IN_STORE', NULL, NULL, 93.55, 0.00, 0.00, 9), +(139, '2026-04-12 09:45:00', 100.71, 'Card', 13, 3, 21, 0, NULL, 'ONLINE', NULL, NULL, 100.71, 0.00, 0.00, 10), +(140, '2026-04-12 11:00:00', 51.07, 'Cash', 6, 1, 22, 0, NULL, 'IN_STORE', NULL, NULL, 51.07, 0.00, 0.00, 5), +(141, '2026-04-12 15:30:00', 139.66, 'Card', 7, 2, 23, 0, NULL, 'ONLINE', NULL, NULL, 139.66, 0.00, 0.00, 13), +(142, '2026-04-13 09:00:00', 73.98, 'Cash', 14, 3, 24, 0, NULL, 'IN_STORE', NULL, NULL, 73.98, 0.00, 0.00, 7), +(143, '2026-04-13 12:15:00', 134.76, 'Card', 4, 1, 25, 0, NULL, 'ONLINE', NULL, NULL, 134.76, 0.00, 0.00, 13), +(144, '2026-04-14 10:30:00', 80.40, 'Cash', 10, 2, 26, 0, NULL, 'IN_STORE', NULL, NULL, 80.40, 0.00, 0.00, 8), +(145, '2026-04-14 14:00:00', 125.90, 'Card', 11, 3, 27, 0, NULL, 'ONLINE', NULL, NULL, 125.90, 0.00, 0.00, 12), +(146, '2026-04-15 10:45:00', 80.62, 'Cash', 5, 1, 28, 0, NULL, 'IN_STORE', NULL, NULL, 80.62, 0.00, 0.00, 8), +(147, '2026-04-15 13:00:00', 141.28, 'Card', 8, 2, 29, 0, NULL, 'ONLINE', NULL, NULL, 141.28, 0.00, 0.00, 14), +(148, '2026-04-16 09:30:00', 97.85, 'Cash', 12, 3, 30, 0, NULL, 'IN_STORE', NULL, NULL, 97.85, 0.00, 0.00, 9), +(149, '2026-04-16 11:45:00', 89.36, 'Card', 6, 1, 31, 0, NULL, 'ONLINE', NULL, NULL, 89.36, 0.00, 0.00, 8); + +INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES +(264, 134, 1, 2, 25.09), +(265, 134, 11, 1, 7.49), +(266, 135, 7, 2, 57.62), +(267, 135, 25, 1, 28.31), +(268, 136, 3, 1, 35.93), +(269, 136, 14, 1, 14.16), +(270, 137, 15, 3, 16.38), +(271, 137, 26, 2, 32.67), +(272, 138, 8, 1, 63.05), +(273, 138, 22, 2, 15.25), +(274, 139, 20, 2, 27.49), +(275, 139, 29, 1, 45.73), +(276, 140, 4, 1, 41.36), +(277, 140, 12, 1, 9.71), +(278, 141, 34, 2, 59.42), +(279, 141, 17, 1, 20.82), +(280, 142, 6, 1, 52.20), +(281, 142, 21, 2, 10.89), +(282, 143, 37, 1, 97.56), +(283, 143, 16, 2, 18.60), +(284, 144, 9, 1, 68.47), +(285, 144, 13, 1, 11.93), +(286, 145, 19, 3, 25.27), +(287, 145, 30, 1, 50.09), +(288, 146, 2, 2, 30.51), +(289, 146, 23, 1, 19.60), +(290, 147, 35, 1, 72.13), +(291, 147, 18, 3, 23.05), +(292, 148, 10, 1, 73.89), +(293, 148, 24, 1, 23.96), +(294, 149, 31, 2, 21.29), +(295, 149, 5, 1, 46.78); diff --git a/backend/src/main/resources/db/migration/V3__nullable_appointment_petid.sql b/backend/src/main/resources/db/migration/V3__nullable_appointment_petid.sql deleted file mode 100644 index 06639401..00000000 --- a/backend/src/main/resources/db/migration/V3__nullable_appointment_petid.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE appointment MODIFY petId BIGINT NULL; -ALTER TABLE appointment DROP FOREIGN KEY fk_appointment_pet; -ALTER TABLE appointment ADD CONSTRAINT fk_appointment_pet FOREIGN KEY (petId) REFERENCES pet(petId) ON DELETE SET NULL; diff --git a/backend/src/main/resources/db/migration/V4__drop_purchase_order_status.sql b/backend/src/main/resources/db/migration/V4__drop_purchase_order_status.sql deleted file mode 100644 index bef741cf..00000000 --- a/backend/src/main/resources/db/migration/V4__drop_purchase_order_status.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE purchaseOrder DROP COLUMN status; diff --git a/backend/src/main/resources/db/migration/V5__seed_data_2026.sql b/backend/src/main/resources/db/migration/V5__seed_data_2026.sql deleted file mode 100644 index 3f8f0a40..00000000 --- a/backend/src/main/resources/db/migration/V5__seed_data_2026.sql +++ /dev/null @@ -1,87 +0,0 @@ -INSERT IGNORE INTO appointment (appointmentId, serviceId, petId, customerId, storeId, employeeId, appointmentDate, appointmentTime, appointmentStatus) VALUES -(91, 1, NULL, 16, 1, 3, '2026-03-08', '09:00:00', 'COMPLETED'), -(92, 2, NULL, 17, 2, 8, '2026-03-10', '10:30:00', 'COMPLETED'), -(93, 3, NULL, 18, 3, 13, '2026-03-12', '13:00:00', 'MISSED'), -(94, 4, NULL, 19, 1, 6, '2026-03-14', '14:30:00', 'COMPLETED'), -(95, 5, NULL, 20, 2, 7, '2026-03-16', '09:00:00', 'COMPLETED'), -(96, 6, NULL, 21, 3, 12, '2026-03-18', '10:30:00', 'COMPLETED'), -(97, 7, NULL, 22, 1, 5, '2026-03-20', '13:00:00', 'CANCELLED'), -(98, 8, NULL, 23, 2, 10, '2026-03-22', '14:30:00', 'COMPLETED'), -(99, 1, NULL, 24, 3, 11, '2026-03-24', '09:00:00', 'COMPLETED'), -(100, 2, NULL, 25, 1, 4, '2026-03-26', '10:30:00', 'MISSED'), -(101, 3, NULL, 26, 2, 9, '2026-03-28', '13:00:00', 'COMPLETED'), -(102, 4, NULL, 27, 3, 14, '2026-03-30', '14:30:00', 'COMPLETED'), -(103, 5, NULL, 28, 1, 3, '2026-04-01', '09:00:00', 'COMPLETED'), -(104, 6, NULL, 29, 2, 8, '2026-04-03', '10:30:00', 'COMPLETED'), -(105, 7, NULL, 30, 3, 13, '2026-04-05', '13:00:00', 'MISSED'), -(106, 8, NULL, 31, 1, 6, '2026-04-07', '14:30:00', 'COMPLETED'), -(107, 1, NULL, 32, 2, 7, '2026-04-09', '09:00:00', 'COMPLETED'), -(108, 2, NULL, 33, 3, 12, '2026-04-11', '10:30:00', 'CANCELLED'), -(109, 3, NULL, 34, 1, 5, '2026-04-13', '13:00:00', 'COMPLETED'), -(110, 4, NULL, 35, 2, 10, '2026-04-15', '10:00:00', 'SCHEDULED'), -(111, 5, NULL, 36, 3, 11, '2026-04-16', '14:00:00', 'SCHEDULED'); - -INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES -(111, '2026-03-08 09:15:00', 87.50, 'Cash', 3, 1, 3, 0, NULL, 'IN_STORE', NULL, NULL, 87.50, 0.00, 0.00, 8), -(112, '2026-03-09 10:22:00', 145.20, 'Card', 8, 2, 4, 0, NULL, 'IN_STORE', NULL, NULL, 145.20, 0.00, 0.00, 14), -(113, '2026-03-10 11:33:00', 63.75, 'Cash', 13, 3, 5, 0, NULL, 'IN_STORE', NULL, NULL, 63.75, 0.00, 0.00, 6), -(114, '2026-03-11 12:44:00', 210.00, 'Card', 6, 1, 6, 0, NULL, 'ONLINE', NULL, NULL, 210.00, 0.00, 0.00, 21), -(115, '2026-03-12 13:55:00', 38.90, 'Cash', 7, 2, 7, 0, NULL, 'IN_STORE', NULL, NULL, 38.90, 0.00, 0.00, 3), -(116, '2026-03-14 09:10:00', 325.40, 'Card', 12, 3, 8, 0, NULL, 'ONLINE', NULL, NULL, 325.40, 0.00, 0.00, 32), -(117, '2026-03-16 10:25:00', 72.15, 'Cash', 5, 1, 9, 0, NULL, 'IN_STORE', NULL, NULL, 72.15, 0.00, 0.00, 7), -(118, '2026-03-18 11:40:00', 190.80, 'Card', 10, 2, 10, 0, NULL, 'ONLINE', NULL, NULL, 190.80, 0.00, 0.00, 19), -(119, '2026-03-20 12:55:00', 55.30, 'Cash', 11, 3, 11, 0, NULL, 'IN_STORE', NULL, NULL, 55.30, 0.00, 0.00, 5), -(120, '2026-03-22 14:10:00', 412.60, 'Card', 4, 1, 12, 0, NULL, 'ONLINE', NULL, NULL, 412.60, 0.00, 0.00, 41), -(121, '2026-03-24 09:30:00', 98.45, 'Cash', 9, 2, 13, 0, NULL, 'IN_STORE', NULL, NULL, 98.45, 0.00, 0.00, 9), -(122, '2026-03-26 10:45:00', 167.70, 'Card', 14, 3, 14, 0, NULL, 'ONLINE', NULL, NULL, 167.70, 0.00, 0.00, 16), -(123, '2026-03-28 12:00:00', 44.20, 'Cash', 3, 1, 15, 0, NULL, 'IN_STORE', NULL, NULL, 44.20, 0.00, 0.00, 4), -(124, '2026-03-30 13:15:00', 289.55, 'Card', 8, 2, 16, 0, NULL, 'ONLINE', NULL, NULL, 289.55, 0.00, 0.00, 28), -(125, '2026-04-01 09:20:00', 76.80, 'Cash', 13, 3, 17, 0, NULL, 'IN_STORE', NULL, NULL, 76.80, 0.00, 0.00, 7), -(126, '2026-04-03 10:35:00', 234.10, 'Card', 6, 1, 18, 0, NULL, 'ONLINE', NULL, NULL, 234.10, 0.00, 0.00, 23), -(127, '2026-04-05 11:50:00', 52.40, 'Cash', 7, 2, 19, 0, NULL, 'IN_STORE', NULL, NULL, 52.40, 0.00, 0.00, 5), -(128, '2026-04-07 13:05:00', 178.90, 'Card', 12, 3, 20, 0, NULL, 'ONLINE', NULL, NULL, 178.90, 0.00, 0.00, 17), -(129, '2026-04-09 09:15:00', 115.60, 'Cash', 5, 1, 21, 0, NULL, 'IN_STORE', NULL, NULL, 115.60, 0.00, 0.00, 11), -(130, '2026-04-11 10:30:00', 367.25, 'Card', 10, 2, 22, 0, NULL, 'ONLINE', NULL, NULL, 367.25, 0.00, 0.00, 36), -(131, '2026-04-14 11:45:00', 89.70, 'Cash', 11, 3, 23, 0, NULL, 'IN_STORE', NULL, NULL, 89.70, 0.00, 0.00, 8), -(132, '2026-04-15 09:00:00', 145.30, 'Card', 4, 1, 24, 0, NULL, 'ONLINE', NULL, NULL, 145.30, 0.00, 0.00, 14), -(133, '2026-04-16 10:00:00', 78.60, 'Cash', 9, 2, 25, 0, NULL, 'IN_STORE', NULL, NULL, 78.60, 0.00, 0.00, 7); - -INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES -(226, 111, 5, 2, 25.50), -(227, 111, 18, 1, 36.50), -(228, 112, 22, 3, 29.80), -(229, 112, 7, 1, 55.80), -(230, 113, 11, 1, 43.75), -(231, 113, 3, 1, 20.00), -(232, 114, 15, 4, 40.00), -(233, 114, 29, 1, 50.00), -(234, 115, 8, 1, 38.90), -(235, 116, 20, 2, 95.00), -(236, 116, 33, 1, 135.40), -(237, 117, 6, 1, 72.15), -(238, 118, 14, 3, 45.00), -(239, 118, 25, 1, 55.80), -(240, 119, 9, 1, 55.30), -(241, 120, 17, 2, 125.00), -(242, 120, 31, 1, 162.60), -(243, 121, 2, 2, 35.50), -(244, 121, 10, 1, 27.45), -(245, 122, 23, 2, 58.50), -(246, 122, 36, 1, 50.70), -(247, 123, 4, 1, 44.20), -(248, 124, 19, 3, 65.00), -(249, 124, 28, 1, 94.55), -(250, 125, 12, 1, 76.80), -(251, 126, 16, 2, 80.00), -(252, 126, 27, 1, 74.10), -(253, 127, 7, 1, 52.40), -(254, 128, 21, 2, 65.00), -(255, 128, 32, 1, 48.90), -(256, 129, 13, 2, 47.80), -(257, 129, 1, 1, 20.00), -(258, 130, 24, 3, 80.00), -(259, 130, 37, 1, 127.25), -(260, 131, 6, 1, 89.70), -(261, 132, 15, 2, 55.00), -(262, 132, 29, 1, 35.30), -(263, 133, 8, 1, 78.60); diff --git a/backend/src/main/resources/db/migration/V6__unique_constraints.sql b/backend/src/main/resources/db/migration/V6__unique_constraints.sql deleted file mode 100644 index 5e26b311..00000000 --- a/backend/src/main/resources/db/migration/V6__unique_constraints.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE users ADD CONSTRAINT uq_users_phone UNIQUE (phone); diff --git a/backend/src/main/resources/db/migration/V7__fix_service_species.sql b/backend/src/main/resources/db/migration/V7__fix_service_species.sql deleted file mode 100644 index 4c22a1b0..00000000 --- a/backend/src/main/resources/db/migration/V7__fix_service_species.sql +++ /dev/null @@ -1,14 +0,0 @@ -DELETE FROM service_species WHERE serviceId = 2 AND species = 'Bird'; - -INSERT INTO service_species (serviceId, species) VALUES -(1, 'Guinea Pig'), -(1, 'Hamster'), -(1, 'Other'), -(2, 'Reptile'), -(2, 'Other'), -(3, 'Reptile'), -(3, 'Other'), -(4, 'Reptile'), -(4, 'Other'), -(5, 'Reptile'), -(5, 'Other'); diff --git a/backend/src/main/resources/db/migration/V8__seed_activity_logs.sql b/backend/src/main/resources/db/migration/V8__seed_activity_logs.sql deleted file mode 100644 index aa3fa6d1..00000000 --- a/backend/src/main/resources/db/migration/V8__seed_activity_logs.sql +++ /dev/null @@ -1,90 +0,0 @@ -INSERT INTO activityLog (userId, storeId, usernameSnapshot, fullNameSnapshot, roleSnapshot, storeNameSnapshot, activity, logTimestamp) VALUES -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 08:02:11'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-01-15 08:15:44'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new product | POST /api/v1/products → 201', '2026-01-15 08:31:07'), -(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 09:00:00'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 09:04:22'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-15 10:12:33'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-01-15 10:18:05'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-01-15 10:25:50'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Updated appointment #12 | PUT /api/v1/appointments/12 → 200', '2026-01-16 11:05:30'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-17 07:58:44'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated pet #8 | PUT /api/v1/pets/8 → 200', '2026-01-17 08:10:19'), -(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-20 09:01:55'), -(16, NULL,'alex.brown', 'Alex Brown', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-20 14:30:22'), -(16, NULL,'alex.brown', 'Alex Brown', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-01-20 14:45:08'), -(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-22 08:55:00'), -(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Updated pet #14 | PUT /api/v1/pets/14 → 200', '2026-01-22 09:20:17'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-01-25 08:00:00'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new service | POST /api/v1/services → 201', '2026-01-25 08:22:41'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new employee | POST /api/v1/employees → 201', '2026-01-25 09:05:14'), -(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-01-28 18:30:00'), -(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-01-28 18:35:12'), -(17, NULL,'alex.clark', 'Alex Clark', 'CUSTOMER', NULL, 'Updated their profile | PUT /api/v1/auth/me → 200', '2026-01-28 18:40:55'), -(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-03 09:00:00'), -(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-02-03 10:15:38'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-05 07:50:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Deleted pet #3 | DELETE /api/v1/pets/3 → 200', '2026-02-05 08:05:33'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated product #22 | PUT /api/v1/products/22 → 200', '2026-02-05 08:30:44'), -(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-07 12:00:00'), -(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-02-07 12:08:17'), -(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Applied a coupon to cart | POST /api/v1/cart/apply-coupon → 200', '2026-02-07 12:12:05'), -(18, NULL,'alex.wilson', 'Alex Wilson', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-02-07 12:20:30'), -(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-10 09:00:00'), -(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Created a new appointment | POST /api/v1/appointments → 201', '2026-02-10 09:30:22'), -(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Updated appointment #25 | PUT /api/v1/appointments/25 → 200', '2026-02-10 11:45:09'), -(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-14 15:00:00'), -(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Started a new chat conversation | POST /api/v1/chat/conversations → 201','2026-02-14 15:05:44'), -(19, NULL,'alex.martinez', 'Alex Martinez', 'CUSTOMER', NULL, 'Sent a chat message | POST /api/v1/chat/conversations/5/messages → 201', '2026-02-14 15:08:22'), -(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-17 09:00:00'), -(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Uploaded image for pet #31 | POST /api/v1/pets/31/image → 200', '2026-02-17 09:25:11'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-02-20 08:00:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-02-20 08:20:35'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated user #18 | PUT /api/v1/users/18 → 200', '2026-02-20 09:10:00'), -(20, NULL,'alex.anderson', 'Alex Anderson', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-02-22 19:00:00'), -(20, NULL,'alex.anderson', 'Alex Anderson', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-02-22 19:15:40'), -(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-01 09:00:00'), -(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-01 10:30:15'), -(7, 2, 'michael.johnson', 'Michael Johnson', 'STAFF', 'North Branch', 'Updated appointment #33 | PUT /api/v1/appointments/33 → 200', '2026-03-01 14:05:22'), -(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-05 11:00:00'), -(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-03-05 11:10:30'), -(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Started checkout | POST /api/v1/cart/checkout → 200', '2026-03-05 11:18:44'), -(21, NULL,'alex.taylor', 'Alex Taylor', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-05 11:22:17'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-08 08:00:00'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Deleted multiple pets | POST /api/v1/pets/bulk-delete → 200', '2026-03-08 08:30:00'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-10 09:00:00'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-10 10:45:33'), -(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-12 16:00:00'), -(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-03-12 16:05:22'), -(22, NULL,'alex.parker', 'Alex Parker', 'CUSTOMER', NULL, 'Updated their profile | PUT /api/v1/auth/me → 200', '2026-03-12 16:20:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-15 07:55:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new product | POST /api/v1/products → 201', '2026-03-15 08:10:45'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated product #35 | PUT /api/v1/products/35 → 200', '2026-03-15 08:40:12'), -(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-18 09:00:00'), -(5, 1, 'david.brown', 'David Brown', 'STAFF', 'Downtown Branch', 'Updated appointment #45 | PUT /api/v1/appointments/45 → 200', '2026-03-18 09:35:08'), -(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-03-20 20:00:00'), -(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Started a new chat conversation | POST /api/v1/chat/conversations → 201','2026-03-20 20:05:30'), -(23, NULL,'alex.evans', 'Alex Evans', 'CUSTOMER', NULL, 'Sent a chat message | POST /api/v1/chat/conversations/9/messages → 201', '2026-03-20 20:08:11'), -(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-24 09:00:00'), -(11, 3, 'lisa.williams', 'Lisa Williams', 'STAFF', 'West Side Store', 'Created a new appointment | POST /api/v1/appointments → 201', '2026-03-24 09:20:44'), -(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-03-27 09:00:00'), -(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Updated appointment #52 | PUT /api/v1/appointments/52 → 200', '2026-03-27 10:10:19'), -(8, 2, 'emma.davis', 'Emma Davis', 'STAFF', 'North Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-03-27 11:30:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-01 08:00:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Created a new pet | POST /api/v1/pets → 201', '2026-04-01 08:15:00'), -(1, 1, 'admin', 'Admin User', 'ADMIN', 'Downtown Branch', 'Updated user #25 | PUT /api/v1/users/25 → 200', '2026-04-01 09:00:22'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-05 10:00:00'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-05 10:15:00'), -(15, NULL,'customer', 'Test Customer', 'CUSTOMER', NULL, 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-05 10:25:44'), -(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-07 09:00:00'), -(3, 1, 'staff', 'Staff User', 'STAFF', 'Downtown Branch', 'Updated pet #47 | PUT /api/v1/pets/47 → 200', '2026-04-07 09:40:55'), -(24, NULL,'alex.scott', 'Alex Scott', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-09 17:00:00'), -(24, NULL,'alex.scott', 'Alex Scott', 'CUSTOMER', NULL, 'Submitted an adoption request | POST /api/v1/adoptions/request → 201', '2026-04-09 17:20:33'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-12 08:00:00'), -(2, 2, 'morgan.lee', 'Morgan Lee', 'ADMIN', 'North Branch', 'Created a new service | POST /api/v1/services → 201', '2026-04-12 08:25:18'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Logged in | POST /api/v1/auth/login → 200', '2026-04-14 09:00:00'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Completed a purchase | POST /api/v1/cart/checkout/complete → 200', '2026-04-14 10:55:30'), -(4, 1, 'sara.smith', 'Sara Smith', 'STAFF', 'Downtown Branch', 'Updated appointment #60 | PUT /api/v1/appointments/60 → 200', '2026-04-14 14:20:00'), -(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Logged in | POST /api/v1/auth/login → 200', '2026-04-15 11:00:00'), -(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Added an item to cart | POST /api/v1/cart/add → 200', '2026-04-15 11:10:22'), -(25, NULL,'alex.adams', 'Alex Adams', 'CUSTOMER', NULL, 'Sent a message to the AI assistant | POST /api/v1/ai-chat/message → 200','2026-04-15 11:30:00'); diff --git a/backend/src/main/resources/db/migration/V9__seed_recent_sales.sql b/backend/src/main/resources/db/migration/V9__seed_recent_sales.sql deleted file mode 100644 index 23695f6f..00000000 --- a/backend/src/main/resources/db/migration/V9__seed_recent_sales.sql +++ /dev/null @@ -1,51 +0,0 @@ -INSERT IGNORE INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES -(134, '2026-04-10 09:15:00', 57.67, 'Cash', 4, 1, 16, 0, NULL, 'IN_STORE', NULL, NULL, 57.67, 0.00, 0.00, 5), -(135, '2026-04-10 11:30:00', 143.55, 'Card', 8, 2, 17, 0, NULL, 'ONLINE', NULL, NULL, 143.55, 0.00, 0.00, 14), -(136, '2026-04-10 14:45:00', 50.09, 'Cash', 12, 3, 18, 0, NULL, 'IN_STORE', NULL, NULL, 50.09, 0.00, 0.00, 5), -(137, '2026-04-11 10:00:00', 114.48, 'Card', 5, 1, 19, 0, NULL, 'ONLINE', NULL, NULL, 114.48, 0.00, 0.00, 11), -(138, '2026-04-11 13:20:00', 93.55, 'Cash', 9, 2, 20, 0, NULL, 'IN_STORE', NULL, NULL, 93.55, 0.00, 0.00, 9), -(139, '2026-04-12 09:45:00', 100.71, 'Card', 13, 3, 21, 0, NULL, 'ONLINE', NULL, NULL, 100.71, 0.00, 0.00, 10), -(140, '2026-04-12 11:00:00', 51.07, 'Cash', 6, 1, 22, 0, NULL, 'IN_STORE', NULL, NULL, 51.07, 0.00, 0.00, 5), -(141, '2026-04-12 15:30:00', 139.66, 'Card', 7, 2, 23, 0, NULL, 'ONLINE', NULL, NULL, 139.66, 0.00, 0.00, 13), -(142, '2026-04-13 09:00:00', 73.98, 'Cash', 14, 3, 24, 0, NULL, 'IN_STORE', NULL, NULL, 73.98, 0.00, 0.00, 7), -(143, '2026-04-13 12:15:00', 134.76, 'Card', 4, 1, 25, 0, NULL, 'ONLINE', NULL, NULL, 134.76, 0.00, 0.00, 13), -(144, '2026-04-14 10:30:00', 80.40, 'Cash', 10, 2, 26, 0, NULL, 'IN_STORE', NULL, NULL, 80.40, 0.00, 0.00, 8), -(145, '2026-04-14 14:00:00', 125.90, 'Card', 11, 3, 27, 0, NULL, 'ONLINE', NULL, NULL, 125.90, 0.00, 0.00, 12), -(146, '2026-04-15 10:45:00', 80.62, 'Cash', 5, 1, 28, 0, NULL, 'IN_STORE', NULL, NULL, 80.62, 0.00, 0.00, 8), -(147, '2026-04-15 13:00:00', 141.28, 'Card', 8, 2, 29, 0, NULL, 'ONLINE', NULL, NULL, 141.28, 0.00, 0.00, 14), -(148, '2026-04-16 09:30:00', 97.85, 'Cash', 12, 3, 30, 0, NULL, 'IN_STORE', NULL, NULL, 97.85, 0.00, 0.00, 9), -(149, '2026-04-16 11:45:00', 89.36, 'Card', 6, 1, 31, 0, NULL, 'ONLINE', NULL, NULL, 89.36, 0.00, 0.00, 8); - -INSERT IGNORE INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES -(264, 134, 1, 2, 25.09), -(265, 134, 11, 1, 7.49), -(266, 135, 7, 2, 57.62), -(267, 135, 25, 1, 28.31), -(268, 136, 3, 1, 35.93), -(269, 136, 14, 1, 14.16), -(270, 137, 15, 3, 16.38), -(271, 137, 26, 2, 32.67), -(272, 138, 8, 1, 63.05), -(273, 138, 22, 2, 15.25), -(274, 139, 20, 2, 27.49), -(275, 139, 29, 1, 45.73), -(276, 140, 4, 1, 41.36), -(277, 140, 12, 1, 9.71), -(278, 141, 34, 2, 59.42), -(279, 141, 17, 1, 20.82), -(280, 142, 6, 1, 52.20), -(281, 142, 21, 2, 10.89), -(282, 143, 37, 1, 97.56), -(283, 143, 16, 2, 18.60), -(284, 144, 9, 1, 68.47), -(285, 144, 13, 1, 11.93), -(286, 145, 19, 3, 25.27), -(287, 145, 30, 1, 50.09), -(288, 146, 2, 2, 30.51), -(289, 146, 23, 1, 19.60), -(290, 147, 35, 1, 72.13), -(291, 147, 18, 3, 23.05), -(292, 148, 10, 1, 73.89), -(293, 148, 24, 1, 23.96), -(294, 149, 31, 2, 21.29), -(295, 149, 5, 1, 46.78);