START TRANSACTION;

CREATE TABLE `training_program` (
	`training_program_id` INT(11) NOT NULL AUTO_INCREMENT,
	`name` CHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`training_program_id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;

ALTER TABLE `training_plan`
	ADD COLUMN `training_program_id` INT NULL DEFAULT NULL AFTER `tree_id`;

ALTER TABLE `training_plan`
	ADD COLUMN `weeks` INT NULL DEFAULT NULL AFTER `active`;

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

COMMIT;
