diff --git a/build.gradle.kts b/build.gradle.kts index b9ff178..55c4e96 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } group = "com.aitrainer" -version = "1.0.42" +version = "1.0.43" java.sourceCompatibility = JavaVersion.VERSION_1_8 repositories { diff --git a/data/db/update_1_0_43.sql b/data/db/update_1_0_43.sql new file mode 100644 index 0000000..b23d744 --- /dev/null +++ b/data/db/update_1_0_43.sql @@ -0,0 +1,8 @@ +START TRANSACTION; + +ALTER TABLE `split_tests` + ADD COLUMN `source` CHAR(250) NULL DEFAULT NULL AFTER `test_value`; + +UPDATE configuration set config_value = "1.0.43", date_change=CURRENT_DATE WHERE config_key = "db_version"; + +COMMIT; diff --git a/src/main/kotlin/com/aitrainer/api/model/CustomerTrainingPlanDetails.kt b/src/main/kotlin/com/aitrainer/api/model/CustomerTrainingPlanDetails.kt index be15189..a2bf26e 100644 --- a/src/main/kotlin/com/aitrainer/api/model/CustomerTrainingPlanDetails.kt +++ b/src/main/kotlin/com/aitrainer/api/model/CustomerTrainingPlanDetails.kt @@ -21,5 +21,5 @@ data class CustomerTrainingPlanDetails ( @ManyToOne(fetch = FetchType.LAZY, optional = false) @JoinColumn(name = "customerTrainingPlanId", nullable = false) @JsonIgnore - val customerTrainingPlan: CustomerTrainingPlan? = null + var customerTrainingPlan: CustomerTrainingPlan? = null } \ No newline at end of file diff --git a/src/main/kotlin/com/aitrainer/api/model/SplitTests.kt b/src/main/kotlin/com/aitrainer/api/model/SplitTests.kt index dd602ba..fe12a60 100644 --- a/src/main/kotlin/com/aitrainer/api/model/SplitTests.kt +++ b/src/main/kotlin/com/aitrainer/api/model/SplitTests.kt @@ -15,6 +15,7 @@ data class SplitTests ( @Expose var remoteConfigKey: String?, @Expose var remoteConfigValue: String?, @Expose @get: NotBlank var testValue: String = "", + @Expose var source: String?, @Expose @get: NotBlank var active: Boolean = false, @Expose var validTo: String?, ) \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index cbc76eb..5828935 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml logging.file=logs # if the database structure has been changed, increment this version number -application.version=1.0.42 +application.version=1.0.43 jwt.secret=aitrainer \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 82ec598..03f8cf4 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -17,7 +17,7 @@ logging.config=classpath:logback-spring.xml logging.file=logs # if the database structure has been changed, increment this version number -application.version=1.0.42 +application.version=1.0.43 jwt.secret=aitrainer jasypt.encryptor.password=Tibor diff --git a/src/test/kotlin/com/aitrainer/api/test/AppPackageTest.kt b/src/test/kotlin/com/aitrainer/api/test/AppPackageTest.kt index b21b1d0..97eee8f 100644 --- a/src/test/kotlin/com/aitrainer/api/test/AppPackageTest.kt +++ b/src/test/kotlin/com/aitrainer/api/test/AppPackageTest.kt @@ -183,9 +183,12 @@ class AppPackageTest { val splitTestJson: String = record[1] val type = object : TypeToken?>() {}.type val tests: List = gson.fromJson(splitTestJson, type) - assertEquals(tests.size,2) + assertEquals(tests.size,3) assertEquals(tests[1].name, "registration_skip") assertEquals(tests[1].testValue, "Colors.cyan") + assertEquals(tests[2].name, "sales_text") + assertEquals(tests[2].testValue, "") + assertEquals(tests[2].source, "description.name") } } }