API 1.0.58 TrainingPlanDetail intensity

This commit is contained in:
Tibor Bossanyi (Freelancer) 2023-01-16 07:54:17 +01:00
parent 29415ba41f
commit aa296d085a
5 changed files with 17 additions and 4 deletions

10
data/db/update_1_0_58.sql Normal file
View File

@ -0,0 +1,10 @@
START TRANSACTION;
ALTER TABLE `training_plan_detail`
ADD COLUMN `ecto_resting_time` INT(5) NULL DEFAULT NULL AFTER `ecto_weight`,
ADD COLUMN `endo_resting_time` INT(5) NULL DEFAULT NULL AFTER `endo_weight`,
ADD COLUMN `intensity` DOUBLE NULL DEFAULT NULL AFTER `round_group`;
UPDATE configuration set config_value = "1.0.58", date_change=CURRENT_DATE WHERE config_key = "db_version";
COMMIT;

View File

@ -20,10 +20,13 @@ data class TrainingPlanDetail (
@Expose var dayId: Int? = 0, @Expose var dayId: Int? = 0,
@Expose var ectoRepeats: Int? = 0, @Expose var ectoRepeats: Int? = 0,
@Expose var ectoWeight: Double? = 0.0, @Expose var ectoWeight: Double? = 0.0,
@Expose var ectoRestingTime: Int? = 0,
@Expose var endoRepeats: Int? = 0, @Expose var endoRepeats: Int? = 0,
@Expose var endoWeight: Double? = 0.0, @Expose var endoWeight: Double? = 0.0,
@Expose var endoRestingTime: Int? = 0,
@Expose var round: Int? = 0, @Expose var round: Int? = 0,
@Expose var roundGroup: String? = null, @Expose var roundGroup: String? = null,
@Expose var intensity: Double? = 0.0,
) { ) {

View File

@ -2,7 +2,7 @@ spring.config.activate.on-profile=prod
spring.config.use-legacy-processing = true spring.config.use-legacy-processing = true
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties) ## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.url = jdbc:mysql://mariadb-galera.db.svc.cluster.local:3307/aitrainer?serverTimezone=CET&useSSL=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&allowMultiQueries=true spring.datasource.url = jdbc:mysql://mariadb-shared.db.svc.cluster.local:3306/aitrainer?serverTimezone=CET&useSSL=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&allowMultiQueries=true
spring.datasource.username = aitrainer spring.datasource.username = aitrainer
spring.datasource.password = ENC(WZplPYr8WmrLHshesY4T6oXplK3MlUVJ) spring.datasource.password = ENC(WZplPYr8WmrLHshesY4T6oXplK3MlUVJ)
@ -14,6 +14,6 @@ logging.config=classpath:logback-spring.xml
logging.file=logs logging.file=logs
# if the database structue has been changed, increment this version number # if the database structue has been changed, increment this version number
application.version=1.0.57 application.version=1.0.58
jwt.secret=aitrainer jwt.secret=aitrainer

View File

@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
logging.file=logs logging.file=logs
# if the database structure has been changed, increment this version number # if the database structure has been changed, increment this version number
application.version=1.0.57 application.version=1.0.58
jwt.secret=aitrainer jwt.secret=aitrainer

View File

@ -182,7 +182,7 @@ class AppPackageTest {
val trainingPlanJson: String = record[1] val trainingPlanJson: String = record[1]
val type = object : TypeToken<List<TrainingPlan?>?>() {}.type val type = object : TypeToken<List<TrainingPlan?>?>() {}.type
val plans: List<TrainingPlan> = gson.fromJson(trainingPlanJson, type) val plans: List<TrainingPlan> = gson.fromJson(trainingPlanJson, type)
assertEquals(plans.size,41) assertEquals(plans.size,57)
assertEquals(plans[1].name, "Beginner Mens workout") assertEquals(plans[1].name, "Beginner Mens workout")
assertEquals(plans[1].internalName, "beginner_man") assertEquals(plans[1].internalName, "beginner_man")
assertEquals(plans[1].free, true) assertEquals(plans[1].free, true)