API 1.0.14 ExerciseDevice, ExerciseTypeDevice
This commit is contained in:
@@ -380,6 +380,51 @@ COLLATE='utf8_hungarian_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
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',
|
||||
`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` (`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);
|
||||
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `exercise_type` ENABLE KEYS */;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
INSERT INTO customer_property (customer_id, property_id, property_value, DATE_ADD)
|
||||
SELECT customer_id, 1, weight, NOW() FROM customer WHERE weight IS NOT NULL AND weight != 0;
|
||||
|
||||
UPDATE configuration set config_value = "1.0.13", date_change=CURRENT_DATE WHERE config_key = "db_version";
|
||||
@@ -0,0 +1,47 @@
|
||||
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 `device_id` (`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";
|
||||
Reference in New Issue
Block a user