DataSource initialization currently supports separate username and password credentials for DDL (schema) and DML (data) scripts. This adds quite a bit of complexity as it means that initialization potentially requires two separate DataSources. Our script-based initialization is intended to be fairly basic with users moving to Flyway or Liquibase when their needs outgrow its capabilities. Neither Flyway nor Liquibase supports separate credentials for DDL and DML so it's hard to see a need for our more basic initialization support to do so.
Comment From: wilkinsona
https://github.com/spring-projects/spring-boot/issues/5402 requested support for separate credentials for DDL and DML. With hindsight, we should have provided a mechanism to configure two lots of initialization, once that runs the DDL scripts and one that runs the DML scripts. This is what you'd have to do with Flyway or Liquibase in this scenario.
Comment From: wilkinsona
This is less critical now as it doesn't compromise the new DataSource initialiser API. Instead, it can be done by auto-configuring two initialisers (one for DDL and one for DML). We may still want to simplify things in the future, but it's hard to justify making a breaking change in 2.x as supporting the current functionality doesn't affect any public API.
Comment From: wilkinsona
We've had no push-back on the deprecation of spring.datasource.schema-username and spring.datasource.data-username in Boot 2.5 and, following their deprecation, they've now been removed in 2.7. There's nothing left to do here.