START TRANSACTION;

ALTER TABLE `training_plan`
	ADD COLUMN `next_training_plan_id` INT(11) NULL DEFAULT NULL AFTER `weeks`;

ALTER TABLE `training_plan_detail`
	ADD COLUMN `ecto_repeats` INT(5) NULL DEFAULT NULL AFTER `day_id`,
	ADD COLUMN `ecto_weight` DOUBLE NULL DEFAULT NULL AFTER `ecto_repeats`,
	ADD COLUMN `endo_repeats` INT(5) NULL DEFAULT NULL AFTER `ecto_weight`,
	ADD COLUMN `endo_weight` DOUBLE NULL DEFAULT NULL AFTER `endo_repeats`,
	ADD COLUMN `round` INT(3) NULL DEFAULT NULL AFTER `endo_weight`,
	ADD COLUMN `round_group` CHAR(50) NULL DEFAULT NULL AFTER `round`;

UPDATE configuration set config_value = "1.0.55", date_change=CURRENT_DATE WHERE config_key = "db_version";

COMMIT;
