CREATE TABLE `exercise_device` (
	`device_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',
	`image_url` CHAR(100) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	PRIMARY KEY (`device_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

INSERT INTO `exercise_device` (`device_id`, `name`, `description`, `image_url`) VALUES (1, 'Weight', NULL, NULL);
INSERT INTO `exercise_device` (`device_id`, `name`, `description`, `image_url`) VALUES (2, 'Own Weight', NULL, NULL);


CREATE TABLE `exercise_device_translation` (
	`translation_id` INT(11) NOT NULL AUTO_INCREMENT,
	`device_id` INT(11) NULL DEFAULT NULL,
	`language_code` CHAR(2) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`name` CHAR(100) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	PRIMARY KEY (`translation_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

INSERT INTO `exercise_device_translation` (`translation_id`, `device_id`, `language_code`, `name`) VALUES (1, 1, 'hu', 'Súlyzó');
INSERT INTO `exercise_device_translation` (`translation_id`, `device_id`, `language_code`, `name`) VALUES (2, 2, 'hu', 'Saját testsúly');



CREATE TABLE `exercise_type_device` (
	`exercise_type_device_id` INT(11) NOT NULL AUTO_INCREMENT,
	`exercise_type_id` INT(11) NOT NULL DEFAULT '0',
	`exercise_device_id` INT(11) NOT NULL DEFAULT '0',
	PRIMARY KEY (`exercise_type_device_id`) USING BTREE,
	INDEX `exercise_type_id` (`exercise_type_id`) USING BTREE,
	INDEX `exercise_device_id` (`exercise_device_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

INSERT INTO `exercise_type_device` (`exercise_type_device_id`, `exercise_type_id`, `exercise_device_id`) VALUES (1, 37, 1);


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