2828import java .util .Map ;
2929
3030import org .springframework .boot .context .properties .ConfigurationProperties ;
31+ import org .springframework .boot .context .properties .DeprecatedConfigurationProperty ;
3132import org .springframework .boot .convert .DurationUnit ;
3233
3334/**
@@ -295,17 +296,6 @@ public class FlywayProperties {
295296 */
296297 private String licenseKey ;
297298
298- /**
299- * Whether to enable support for Oracle SQL*Plus commands. Requires Flyway Teams.
300- */
301- private Boolean oracleSqlplus ;
302-
303- /**
304- * Whether to issue a warning rather than an error when a not-yet-supported Oracle
305- * SQL*Plus statement is encountered. Requires Flyway Teams.
306- */
307- private Boolean oracleSqlplusWarn ;
308-
309299 /**
310300 * Whether to stream SQL migrations when executing them. Requires Flyway Teams.
311301 */
@@ -332,28 +322,12 @@ public class FlywayProperties {
332322 */
333323 private String kerberosConfigFile ;
334324
335- /**
336- * Path of the Oracle Kerberos cache file. Requires Flyway Teams.
337- */
338- private String oracleKerberosCacheFile ;
339-
340- /**
341- * Location of the Oracle Wallet, used to sign in to the database automatically.
342- * Requires Flyway Teams.
343- */
344- private String oracleWalletLocation ;
345-
346325 /**
347326 * Whether Flyway should output a table with the results of queries when executing
348327 * migrations. Requires Flyway Teams.
349328 */
350329 private Boolean outputQueryResults ;
351330
352- /**
353- * Path to the SQL Server Kerberos login file. Requires Flyway Teams.
354- */
355- private String sqlServerKerberosLoginFile ;
356-
357331 /**
358332 * Whether Flyway should skip executing the contents of the migrations and only update
359333 * the schema history table. Requires Flyway teams.
@@ -372,8 +346,12 @@ public class FlywayProperties {
372346 */
373347 private Boolean detectEncoding ;
374348
349+ private final Oracle oracle = new Oracle ();
350+
375351 private final Postgresql postgresql = new Postgresql ();
376352
353+ private final Sqlserver sqlserver = new Sqlserver ();
354+
377355 public boolean isEnabled () {
378356 return this .enabled ;
379357 }
@@ -758,28 +736,37 @@ public void setLicenseKey(String licenseKey) {
758736 this .licenseKey = licenseKey ;
759737 }
760738
739+ @ DeprecatedConfigurationProperty (replacement = "spring.flyway.oracle.sqlplus" )
740+ @ Deprecated (since = "3.2.0" , forRemoval = true )
761741 public Boolean getOracleSqlplus () {
762- return this . oracleSqlplus ;
742+ return getOracle (). getSqlplus () ;
763743 }
764744
745+ @ Deprecated (since = "3.2.0" , forRemoval = true )
765746 public void setOracleSqlplus (Boolean oracleSqlplus ) {
766- this . oracleSqlplus = oracleSqlplus ;
747+ getOracle (). setSqlplus ( oracleSqlplus ) ;
767748 }
768749
750+ @ DeprecatedConfigurationProperty (replacement = "spring.flyway.oracle.sqlplus-warn" )
751+ @ Deprecated (since = "3.2.0" , forRemoval = true )
769752 public Boolean getOracleSqlplusWarn () {
770- return this . oracleSqlplusWarn ;
753+ return getOracle (). getSqlplusWarn () ;
771754 }
772755
756+ @ Deprecated (since = "3.2.0" , forRemoval = true )
773757 public void setOracleSqlplusWarn (Boolean oracleSqlplusWarn ) {
774- this . oracleSqlplusWarn = oracleSqlplusWarn ;
758+ getOracle (). setSqlplusWarn ( oracleSqlplusWarn ) ;
775759 }
776760
761+ @ DeprecatedConfigurationProperty (replacement = "spring.flyway.oracle.wallet-location" )
762+ @ Deprecated (since = "3.2.0" , forRemoval = true )
777763 public String getOracleWalletLocation () {
778- return this . oracleWalletLocation ;
764+ return getOracle (). getWalletLocation () ;
779765 }
780766
767+ @ Deprecated (since = "3.2.0" , forRemoval = true )
781768 public void setOracleWalletLocation (String oracleWalletLocation ) {
782- this . oracleWalletLocation = oracleWalletLocation ;
769+ getOracle (). setWalletLocation ( oracleWalletLocation ) ;
783770 }
784771
785772 public Boolean getStream () {
@@ -822,12 +809,15 @@ public void setKerberosConfigFile(String kerberosConfigFile) {
822809 this .kerberosConfigFile = kerberosConfigFile ;
823810 }
824811
812+ @ DeprecatedConfigurationProperty (replacement = "spring.flyway.oracle.kerberos-cache-file" )
813+ @ Deprecated (since = "3.2.0" , forRemoval = true )
825814 public String getOracleKerberosCacheFile () {
826- return this . oracleKerberosCacheFile ;
815+ return getOracle (). getKerberosCacheFile () ;
827816 }
828817
818+ @ Deprecated (since = "3.2.0" , forRemoval = true )
829819 public void setOracleKerberosCacheFile (String oracleKerberosCacheFile ) {
830- this . oracleKerberosCacheFile = oracleKerberosCacheFile ;
820+ getOracle (). setKerberosCacheFile ( oracleKerberosCacheFile ) ;
831821 }
832822
833823 public Boolean getOutputQueryResults () {
@@ -838,12 +828,15 @@ public void setOutputQueryResults(Boolean outputQueryResults) {
838828 this .outputQueryResults = outputQueryResults ;
839829 }
840830
831+ @ DeprecatedConfigurationProperty (replacement = "spring.flyway.sqlserver.kerberos-login-file" )
832+ @ Deprecated (since = "3.2.0" , forRemoval = true )
841833 public String getSqlServerKerberosLoginFile () {
842- return this . sqlServerKerberosLoginFile ;
834+ return getSqlserver (). getKerberosLoginFile () ;
843835 }
844836
837+ @ Deprecated (since = "3.2.0" , forRemoval = true )
845838 public void setSqlServerKerberosLoginFile (String sqlServerKerberosLoginFile ) {
846- this . sqlServerKerberosLoginFile = sqlServerKerberosLoginFile ;
839+ getSqlserver (). setKerberosLoginFile ( sqlServerKerberosLoginFile ) ;
847840 }
848841
849842 public Boolean getSkipExecutingMigrations () {
@@ -870,10 +863,79 @@ public void setDetectEncoding(final Boolean detectEncoding) {
870863 this .detectEncoding = detectEncoding ;
871864 }
872865
866+ public Oracle getOracle () {
867+ return this .oracle ;
868+ }
869+
873870 public Postgresql getPostgresql () {
874871 return this .postgresql ;
875872 }
876873
874+ public Sqlserver getSqlserver () {
875+ return this .sqlserver ;
876+ }
877+
878+ /**
879+ * {@code OracleConfigurationExtension} properties.
880+ */
881+ public static class Oracle {
882+
883+ /**
884+ * Whether to enable support for Oracle SQL*Plus commands. Requires Flyway Teams.
885+ */
886+ private Boolean sqlplus ;
887+
888+ /**
889+ * Whether to issue a warning rather than an error when a not-yet-supported Oracle
890+ * SQL*Plus statement is encountered. Requires Flyway Teams.
891+ */
892+ private Boolean sqlplusWarn ;
893+
894+ /**
895+ * Path of the Oracle Kerberos cache file. Requires Flyway Teams.
896+ */
897+ private String kerberosCacheFile ;
898+
899+ /**
900+ * Location of the Oracle Wallet, used to sign in to the database automatically.
901+ * Requires Flyway Teams.
902+ */
903+ private String walletLocation ;
904+
905+ public Boolean getSqlplus () {
906+ return this .sqlplus ;
907+ }
908+
909+ public void setSqlplus (Boolean sqlplus ) {
910+ this .sqlplus = sqlplus ;
911+ }
912+
913+ public Boolean getSqlplusWarn () {
914+ return this .sqlplusWarn ;
915+ }
916+
917+ public void setSqlplusWarn (Boolean sqlplusWarn ) {
918+ this .sqlplusWarn = sqlplusWarn ;
919+ }
920+
921+ public String getKerberosCacheFile () {
922+ return this .kerberosCacheFile ;
923+ }
924+
925+ public void setKerberosCacheFile (String kerberosCacheFile ) {
926+ this .kerberosCacheFile = kerberosCacheFile ;
927+ }
928+
929+ public String getWalletLocation () {
930+ return this .walletLocation ;
931+ }
932+
933+ public void setWalletLocation (String walletLocation ) {
934+ this .walletLocation = walletLocation ;
935+ }
936+
937+ }
938+
877939 /**
878940 * {@code PostgreSQLConfigurationExtension} properties.
879941 */
@@ -895,4 +957,24 @@ public void setTransactionalLock(Boolean transactionalLock) {
895957
896958 }
897959
960+ /**
961+ * {@code SQLServerConfigurationExtension} properties.
962+ */
963+ public static class Sqlserver {
964+
965+ /**
966+ * Path to the SQL Server Kerberos login file. Requires Flyway Teams.
967+ */
968+ private String kerberosLoginFile ;
969+
970+ public String getKerberosLoginFile () {
971+ return this .kerberosLoginFile ;
972+ }
973+
974+ public void setKerberosLoginFile (String kerberosLoginFile ) {
975+ this .kerberosLoginFile = kerberosLoginFile ;
976+ }
977+
978+ }
979+
898980}
0 commit comments