START TRANSACTION;

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


CREATE TABLE `tutorial_steps` (
	`tutorial_step_id` INT(11) NOT NULL AUTO_INCREMENT,
	`tutorial_id` INT(11) NOT NULL DEFAULT '0',
	`step` INT(3) NOT NULL DEFAULT '0',
	`tutorial_text` TEXT NOT NULL COLLATE 'utf8_hungarian_ci',
	`error_text` TEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	`check_text` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
	PRIMARY KEY (`tutorial_step_id`) USING BTREE,
	INDEX `tutorial_id` (`tutorial_id`) USING BTREE
)
COLLATE='utf8_hungarian_ci'
ENGINE=InnoDB
;

CREATE TABLE `tutorial_translation` (
	`translation_id` INT(13) NOT NULL AUTO_INCREMENT,
	`language_code` CHAR(2) NOT NULL DEFAULT 'en' COLLATE 'utf8mb4_general_ci',
	`tutorial_step_id` INT(13) NOT NULL DEFAULT '0',
	`tutorial_text` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`error_text` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`check_text` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`translation_id`) USING BTREE,
	INDEX `tutorial_step_id` (`tutorial_step_id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;


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

COMMIT;

