START TRANSACTION;

CREATE TABLE `tracking` (
	`tacking_id` INT(20) NOT NULL AUTO_INCREMENT,
	`customer_id` INT(20) NOT NULL DEFAULT '0',
	`date_add` DATETIME NOT NULL,
	`event` CHAR(100) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`event_value` DOUBLE NULL DEFAULT NULL,
	`area` CHAR(100) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`platform` CHAR(20) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`version` CHAR(20) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	PRIMARY KEY (`tacking_id`) USING BTREE,
	INDEX `customer_id` (`customer_id`) USING BTREE,
	INDEX `event` (`event`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;


CREATE TABLE `exercise_ability` (
	`exercise_ability_id` INT(11) NOT NULL AUTO_INCREMENT,
	`name` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`description` VARCHAR(200) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	PRIMARY KEY (`exercise_ability_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

CREATE TABLE `exercise_tree_ability` (
	`exercise_tree_ability_id` INT(11) NOT NULL AUTO_INCREMENT,
	`exercise_tree_id` INT(11) NOT NULL DEFAULT '0',
	`exercise_ability_id` INT(11) NOT NULL DEFAULT '0',
	PRIMARY KEY (`exercise_tree_ability_id`) USING BTREE,
	INDEX `exercise_tree_id` (`exercise_tree_id`) USING BTREE,
	INDEX `exercise_ability_id` (`exercise_ability_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

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

COMMIT;

