Flyway is a database migration tool that applies version-controlled SQL scripts to manage schema changes across 50+ database engines (relational and NoSQL). It operates as a Java library, CLI, Maven/Gradle plugin, and Docker image. The core architecture centers on a plugin system where `DatabaseType`, `VerbExtension`, `ConfigurationExtension`, and `Callback` implementations are discovered via Java ServiceLoader. The migration lifecycle is orchestrated by `FlywayExectutor`: it resolves migration scripts (SQL or Java), validates them against a schema history table, applies pending migrations in transaction-aware batches, and registers the result. Telemetry and license enforcement are woven into execution. The codebase is large but well-organised into modules: `flyway-core` for the engine, `flyway-commandline` for the CLI, `flyway-database-*` for per-database parsers and connections, `flyway-nc` for a dual native-connector path, and `flyway-reports` for output generation. External dependencies include JDBC drivers, AWS SDK (S3), and third-party helpers like SQLFluff (via Docker). Key entry points are the `Flyway` API class, the `Main` CLI class, and the `VerbExtension` implementations.