
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 📊 [FlywayTenantMigration] Found 1 tenant(s) to migrate
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ═══════════════════════════════════════════════════════
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 🔧 [FlywayTenantMigration] Migrating tenant schema: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    ├─ Tenant ID: e7f7179a-5393-4711-adae-083a22cf9e68
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    ├─ Tenant Name: Clinique La Rive1 Bleue1
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    └─ Schema Name: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 🚀 [FlywayTenantMigration] Starting Flyway migration for schema: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ⚙️ [FlywayTenantMigration] Configuring Flyway...
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    ├─ Target Schema: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    ├─ Migration Location: classpath:db/migration/tenant
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    ├─ History Table: flyway_schema_history
2025-10-21T13:52:35.093+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     :    └─ Baseline on Migrate: true
2025-10-21T13:52:35.097+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 🔍 [FlywayTenantMigration] Executing Flyway.migrate()...
2025-10-21T13:52:35.101+01:00  INFO 19899 --- [saas-multitenant-api] [           main] org.flywaydb.core.FlywayExecutor         : Database: jdbc:mysql://localhost:3306/saas_db?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC (MySQL 8.4)
2025-10-21T13:52:35.104+01:00  WARN 19899 --- [saas-multitenant-api] [           main] o.f.c.internal.database.base.Database    : Flyway upgrade recommended: MySQL 8.4 is newer than this version of Flyway and support has not been tested. The latest supported version of MySQL is 8.1.
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ╔═══════════════════════════════════════════════════════╗
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ║     FLYWAY MIGRATION FAILED                          ║
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ╚═══════════════════════════════════════════════════════╝
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Flyway migration FAILED for schema: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Exception type: org.flywaydb.core.api.exception.FlywayValidateException
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Exception message: Validate failed: Migrations have failed validation
Detected failed migration to version 2 (add provider to inbound call data).
Please remove any half-completed changes then run repair to fix the schema history.
Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Stack trace:

org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation
Detected failed migration to version 2 (add provider to inbound call data).
Please remove any half-completed changes then run repair to fix the schema history.
Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE
	at org.flywaydb.core.Flyway.lambda$migrate$1(Flyway.java:201)
	at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:210)
	at org.flywaydb.core.Flyway.migrate(Flyway.java:188)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateTenant(FlywayTenantMigrationService.java:94)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateAllTenants(FlywayTenantMigrationService.java:47)
	at com.saas.shared.config.TenantMigrationRunner.run(TenantMigrationRunner.java:23)
	at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:784)
	at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)
	at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
	at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:796)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784)
	at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:772)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:571)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:772)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
	at com.saas.SaasApplication.main(SaasApplication.java:13)

2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] FAILED to migrate schema: tenant_clinique_la_rive1_bleue1

java.lang.RuntimeException: Failed to migrate tenant schema: tenant_clinique_la_rive1_bleue1
	at com.saas.shared.config.FlywayTenantMigrationService.migrateTenant(FlywayTenantMigrationService.java:112)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateAllTenants(FlywayTenantMigrationService.java:47)
	at com.saas.shared.config.TenantMigrationRunner.run(TenantMigrationRunner.java:23)
	at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:784)
	at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)
	at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
	at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:796)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784)
	at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:772)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:571)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:772)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
	at com.saas.SaasApplication.main(SaasApplication.java:13)
Caused by: org.flywaydb.core.api.exception.FlywayValidateException: Validate failed: Migrations have failed validation
Detected failed migration to version 2 (add provider to inbound call data).
Please remove any half-completed changes then run repair to fix the schema history.
Need more flexibility with validation rules? Learn more: https://rd.gt/3AbJUZE
	at org.flywaydb.core.Flyway.lambda$migrate$1(Flyway.java:201)
	at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:210)
	at org.flywaydb.core.Flyway.migrate(Flyway.java:188)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateTenant(FlywayTenantMigrationService.java:94)
	... 22 common frames omitted

2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Exception type: java.lang.RuntimeException
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ❌ [FlywayTenantMigration] Exception message: Failed to migrate tenant schema: tenant_clinique_la_rive1_bleue1
2025-10-21T13:52:35.111+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ╔═══════════════════════════════════════════════════════╗
2025-10-21T13:52:35.111+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ║     FLYWAY MIGRATION COMPLETE                        ║
2025-10-21T13:52:35.111+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : ╚═══════════════════════════════════════════════════════╝
2025-10-21T13:52:35.111+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 🏁 [FlywayTenantMigration] Success: 0 / 1
2025-10-21T13:52:35.111+01:00  INFO 19899 --- [saas-multitenant-api] [           main] c.s.s.c.FlywayTenantMigrationService     : 🏁 [FlywayTenantMigration] Failures: 1
2025-10-21T13:52:35.111+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.shared.config.TenantMigrationRunner  : ❌ [TenantMigrationRunner] CRITICAL: Failed to run tenant migrations on startup

java.lang.RuntimeException: Tenant migration failed for 1 schemas (out of 1 total)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateAllTenants(FlywayTenantMigrationService.java:67)
	at com.saas.shared.config.TenantMigrationRunner.run(TenantMigrationRunner.java:23)
	at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:784)
	at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)
	at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
	at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:796)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784)
	at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:772)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:571)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:772)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
	at com.saas.SaasApplication.main(SaasApplication.java:13)

2025-10-21T13:52:35.112+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] c.s.shared.config.TenantMigrationRunner  : ❌ [TenantMigrationRunner] Application may not function correctly until migrations are applied!
2025-10-21T13:52:35.112+01:00  INFO 19899 --- [saas-multitenant-api] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-10-21T13:52:35.118+01:00 ERROR 19899 --- [saas-multitenant-api] [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.RuntimeException: Failed to apply tenant migrations on startup
	at com.saas.shared.config.TenantMigrationRunner.run(TenantMigrationRunner.java:28)
	at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:784)
	at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:82)
	at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
	at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:86)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:796)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784)
	at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:772)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:571)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:772)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
	at com.saas.SaasApplication.main(SaasApplication.java:13)
Caused by: java.lang.RuntimeException: Tenant migration failed for 1 schemas (out of 1 total)
	at com.saas.shared.config.FlywayTenantMigrationService.migrateAllTenants(FlywayTenantMigrationService.java:67)
	at com.saas.shared.config.TenantMigrationRunner.run(TenantMigrationRunner.java:23)
	... 20 common frames omitted