API 1.0.26 ExercisePlanTemplate
This commit is contained in:
+46
-4
@@ -529,16 +529,18 @@ CREATE TABLE IF NOT EXISTS `exercise_plan` (
|
||||
`private` tinyint(4) DEFAULT 0,
|
||||
`date_add` datetime DEFAULT NULL,
|
||||
`date_upd` datetime DEFAULT NULL,
|
||||
`type` ENUM('custom','mini_test_set','special') NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
||||
`exercise_plan_template_id` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`exercise_plan_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Tábla adatainak mentése aitrainer2.exercise_plan: ~4 rows (hozzávetőleg)
|
||||
/*!40000 ALTER TABLE `exercise_plan` DISABLE KEYS */;
|
||||
REPLACE INTO `exercise_plan` (`exercise_plan_id`, `customer_id`, `name`, `description`, `private`, `date_add`, `date_upd`) VALUES
|
||||
(3, 90, 'Common', 'Common training plan', 0, NULL, NULL),
|
||||
(4, 90, 'Chuck Norris Plan', '', 0, NULL, NULL),
|
||||
(6, 90, 'Boss private', '', 1, '2020-09-08 00:06:26', NULL),
|
||||
(20, 90, 'Boss private 2', NULL, 1, '2020-09-09 00:06:19', NULL);
|
||||
(3, 90, 'Common', 'Common training plan', 0, NULL, NULL, NULL, NULL),
|
||||
(4, 90, 'Chuck Norris Plan', '', 0, NULL, NULL, NULL, NULL),
|
||||
(6, 90, 'Boss private', '', 1, '2020-09-08 00:06:26', NULL, NULL, NULL),
|
||||
(20, 90, 'Boss private 2', NULL, 1, '2020-09-09 00:06:19', NULL, NULL, NULL);
|
||||
/*!40000 ALTER TABLE `exercise_plan` ENABLE KEYS */;
|
||||
|
||||
-- Struktúra mentése tábla aitrainer2. exercise_plan_detail
|
||||
@@ -938,6 +940,46 @@ COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `exercise_plan_template` (
|
||||
`exercise_plan_template_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`template_type` ENUM('special','mini_test_set') NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
`name` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
`description` MEDIUMTEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
PRIMARY KEY (`exercise_plan_template_id`) USING BTREE,
|
||||
INDEX `template_type` (`template_type`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `exercise_plan_template_detail` (
|
||||
`exercise_plan_template_detail_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`exercise_plan_template_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`exercise_type_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`quantity` DOUBLE NULL DEFAULT '0',
|
||||
`quantity_unit_quantity` DOUBLE NULL DEFAULT '0',
|
||||
`serie` INT(11) NULL DEFAULT '0',
|
||||
`resting_time` TIME NULL DEFAULT '00:00:00',
|
||||
PRIMARY KEY (`exercise_plan_template_detail_id`) USING BTREE,
|
||||
INDEX `exercise_type_id` (`exercise_type_id`) USING BTREE,
|
||||
INDEX `exercise_plan_template_id` (`exercise_plan_template_id`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `exercise_plan_template_translation` (
|
||||
`translation_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`exercise_plan_template_id` INT(11) NULL DEFAULT NULL,
|
||||
`language_code` CHAR(2) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
|
||||
`name` CHAR(50) NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
|
||||
`description` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
||||
PRIMARY KEY (`translation_id`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE `exercise_plan_template` (
|
||||
`exercise_plan_template_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`template_type` ENUM('special','mini_test_set') NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
`name` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
`description` TEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
PRIMARY KEY (`exercise_plan_template_id`) USING BTREE,
|
||||
INDEX `template_type` (`template_type`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `exercise_plan_template_detail` (
|
||||
`exercise_plan_template_detail_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`exercise_plan_template_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`exercise_type_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`quantity` DOUBLE NULL DEFAULT '0',
|
||||
`quantity_unit_quantity` DOUBLE NULL DEFAULT '0',
|
||||
`serie` INT(11) NULL DEFAULT '0',
|
||||
`resting_time` TIME NULL DEFAULT '00:00:00',
|
||||
PRIMARY KEY (`exercise_plan_template_detail_id`) USING BTREE,
|
||||
INDEX `exercise_type_id` (`exercise_type_id`) USING BTREE,
|
||||
INDEX `exercise_plan_template_id` (`exercise_plan_template_id`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `exercise_plan_template_translation` (
|
||||
`translation_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`exercise_plan_template_id` INT(11) NULL DEFAULT NULL,
|
||||
`language_code` CHAR(2) NOT NULL DEFAULT '0' COLLATE 'utf8_hungarian_ci',
|
||||
`name` CHAR(50) NULL DEFAULT '0' COLLATE 'utf8_hungarian_ci',
|
||||
`description` TEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci',
|
||||
PRIMARY KEY (`translation_id`) USING BTREE
|
||||
)
|
||||
COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
ALTER TABLE `exercise_plan`
|
||||
ADD COLUMN `type` ENUM('custom','mini_test_set','special') NULL DEFAULT NULL AFTER `date_upd`,
|
||||
ADD COLUMN `exercise_plan_template_id` INT NULL DEFAULT NULL AFTER `type`;
|
||||
|
||||
UPDATE configuration set config_value = "1.0.26", date_change=CURRENT_DATE WHERE config_key = "db_version";
|
||||
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user