fix flyway failed migration

This commit is contained in:
2026-04-15 14:52:05 -06:00
parent 0bfd709f1f
commit 49685a75f7
2 changed files with 4 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ public class FlywayContextInitializer implements ApplicationContextInitializer<C
.dataSource(url, username, password)
.locations(locations)
.load();
flyway.repair();
flyway.migrate();
return;
} catch (RuntimeException ex) {

View File

@@ -1,4 +1,4 @@
INSERT INTO appointment (appointmentId, serviceId, petId, customerId, storeId, employeeId, appointmentDate, appointmentTime, appointmentStatus) VALUES
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'),
@@ -21,7 +21,7 @@ INSERT INTO appointment (appointmentId, serviceId, petId, customerId, storeId, e
(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 INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, storeId, customerId, isRefund, originalSaleId, channel, cartId, couponId, subtotalAmount, couponDiscountAmount, employeeDiscountAmount, pointsEarned) VALUES
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),
@@ -46,7 +46,7 @@ INSERT INTO sale (saleId, saleDate, totalAmount, paymentMethod, employeeId, stor
(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 INTO saleItem (saleItemId, saleId, prodId, quantity, unitPrice) VALUES
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),