From d42cef07783c12a94024e97e0e05bc103c40b5d3 Mon Sep 17 00:00:00 2001 From: Bossanyi Tibor Date: Wed, 14 Apr 2021 22:50:49 +0200 Subject: [PATCH] API 1.0.30+2 CustomerActivity, Sort ExercisePlanTemplateDetail.sort --- data/db/install.sql | 921 ++++++++++++------ .../resources/application-prod.properties | 2 +- src/main/resources/application.properties | 2 +- 3 files changed, 623 insertions(+), 302 deletions(-) diff --git a/data/db/install.sql b/data/db/install.sql index 23558ee..fb11921 100644 --- a/data/db/install.sql +++ b/data/db/install.sql @@ -2,7 +2,7 @@ -- Host: 127.0.0.1 -- Szerver verzió: 10.4.11-MariaDB - mariadb.org binary distribution -- Szerver OS: Win64 --- HeidiSQL Verzió: 11.1.0.6116 +-- HeidiSQL Verzió: 11.2.0.6213 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -49,9 +49,9 @@ CREATE TABLE IF NOT EXISTS `auth_permission` ( PRIMARY KEY (`id`), UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`), CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.auth_permission: ~32 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.auth_permission: ~112 rows (hozzávetőleg) /*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */; REPLACE INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES (1, 'Can add exercise type', 1, 'add_exercisetype'), @@ -85,7 +85,91 @@ REPLACE INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VAL (29, 'Can add session', 8, 'add_session'), (30, 'Can change session', 8, 'change_session'), (31, 'Can delete session', 8, 'delete_session'), - (32, 'Can view session', 8, 'view_session'); + (32, 'Can view session', 8, 'view_session'), + (33, 'Can add Exercise Device', 17, 'add_exercisedevice'), + (34, 'Can change Exercise Device', 17, 'change_exercisedevice'), + (35, 'Can delete Exercise Device', 17, 'delete_exercisedevice'), + (36, 'Can view Exercise Device', 17, 'view_exercisedevice'), + (37, 'Can add Device Alternative', 19, 'add_exercisedevicealternative'), + (38, 'Can change Device Alternative', 19, 'change_exercisedevicealternative'), + (39, 'Can delete Device Alternative', 19, 'delete_exercisedevicealternative'), + (40, 'Can view Device Alternative', 19, 'view_exercisedevicealternative'), + (41, 'Can add Translation', 23, 'add_exercisedevicetranslation'), + (42, 'Can change Translation', 23, 'change_exercisedevicetranslation'), + (43, 'Can delete Translation', 23, 'delete_exercisedevicetranslation'), + (44, 'Can view Translation', 23, 'view_exercisedevicetranslation'), + (45, 'Can add Exercise Tree', 10, 'add_exercisetree'), + (46, 'Can change Exercise Tree', 10, 'change_exercisetree'), + (47, 'Can delete Exercise Tree', 10, 'delete_exercisetree'), + (48, 'Can view Exercise Tree', 10, 'view_exercisetree'), + (49, 'Can add Translation', 24, 'add_exercisetreetranslation'), + (50, 'Can change Translation', 24, 'change_exercisetreetranslation'), + (51, 'Can delete Translation', 24, 'delete_exercisetreetranslation'), + (52, 'Can view Translation', 24, 'view_exercisetreetranslation'), + (53, 'Can add Menu Tree Representation', 21, 'add_exercisetreeparents'), + (54, 'Can change Menu Tree Representation', 21, 'change_exercisetreeparents'), + (55, 'Can delete Menu Tree Representation', 21, 'delete_exercisetreeparents'), + (56, 'Can view Menu Tree Representation', 21, 'view_exercisetreeparents'), + (57, 'Can add Translation', 9, 'add_exercisetypetranslation'), + (58, 'Can change Translation', 9, 'change_exercisetypetranslation'), + (59, 'Can delete Translation', 9, 'delete_exercisetypetranslation'), + (60, 'Can view Translation', 9, 'view_exercisetypetranslation'), + (61, 'Can add Exercise Device', 25, 'add_exercisetypedevice'), + (62, 'Can change Exercise Device', 25, 'change_exercisetypedevice'), + (63, 'Can delete Exercise Device', 25, 'delete_exercisetypedevice'), + (64, 'Can view Exercise Device', 25, 'view_exercisetypedevice'), + (65, 'Can add Exercise Alternative', 18, 'add_exercisetypealternative'), + (66, 'Can change Exercise Alternative', 18, 'change_exercisetypealternative'), + (67, 'Can delete Exercise Alternative', 18, 'delete_exercisetypealternative'), + (68, 'Can view Exercise Alternative', 18, 'view_exercisetypealternative'), + (69, 'Can add Exercise Parent', 20, 'add_exercisetypeparents'), + (70, 'Can change Exercise Parent', 20, 'change_exercisetypeparents'), + (71, 'Can delete Exercise Parent', 20, 'delete_exercisetypeparents'), + (72, 'Can view Exercise Parent', 20, 'view_exercisetypeparents'), + (73, 'Can add Exercise Plan Template', 22, 'add_exerciseplantemplate'), + (74, 'Can change Exercise Plan Template', 22, 'change_exerciseplantemplate'), + (75, 'Can delete Exercise Plan Template', 22, 'delete_exerciseplantemplate'), + (76, 'Can view Exercise Plan Template', 22, 'view_exerciseplantemplate'), + (77, 'Can add Translation', 26, 'add_exerciseplantemplatetranslation'), + (78, 'Can change Translation', 26, 'change_exerciseplantemplatetranslation'), + (79, 'Can delete Translation', 26, 'delete_exerciseplantemplatetranslation'), + (80, 'Can view Translation', 26, 'view_exerciseplantemplatetranslation'), + (81, 'Can add Exercise Plan Template Detail', 27, 'add_exerciseplantemplatedetail'), + (82, 'Can change Exercise Plan Template Detail', 27, 'change_exerciseplantemplatedetail'), + (83, 'Can delete Exercise Plan Template Detail', 27, 'delete_exerciseplantemplatedetail'), + (84, 'Can view Exercise Plan Template Detail', 27, 'view_exerciseplantemplatedetail'), + (85, 'Can add Exercise Plan', 11, 'add_exerciseplan'), + (86, 'Can change Exercise Plan', 11, 'change_exerciseplan'), + (87, 'Can delete Exercise Plan', 11, 'delete_exerciseplan'), + (88, 'Can view Exercise Plan', 11, 'view_exerciseplan'), + (89, 'Can add Translation', 28, 'add_exerciseplantranslation'), + (90, 'Can change Translation', 28, 'change_exerciseplantranslation'), + (91, 'Can delete Translation', 28, 'delete_exerciseplantranslation'), + (92, 'Can view Translation', 28, 'view_exerciseplantranslation'), + (93, 'Can add Exercise Plan Detail', 12, 'add_exerciseplandetail'), + (94, 'Can change Exercise Plan Detail', 12, 'change_exerciseplandetail'), + (95, 'Can delete Exercise Plan Detail', 12, 'delete_exerciseplandetail'), + (96, 'Can view Exercise Plan Detail', 12, 'view_exerciseplandetail'), + (97, 'Can add Product', 13, 'add_product'), + (98, 'Can change Product', 13, 'change_product'), + (99, 'Can delete Product', 13, 'delete_product'), + (100, 'Can view Product', 13, 'view_product'), + (101, 'Can add Purchase', 15, 'add_purchase'), + (102, 'Can change Purchase', 15, 'change_purchase'), + (103, 'Can delete Purchase', 15, 'delete_purchase'), + (104, 'Can view Purchase', 15, 'view_purchase'), + (105, 'Can add Customer Property', 16, 'add_property'), + (106, 'Can change Customer Property', 16, 'change_property'), + (107, 'Can delete Customer Property', 16, 'delete_property'), + (108, 'Can view Customer Property', 16, 'view_property'), + (109, 'Can add Translation', 29, 'add_propertytranslation'), + (110, 'Can change Translation', 29, 'change_propertytranslation'), + (111, 'Can delete Translation', 29, 'delete_propertytranslation'), + (112, 'Can view Translation', 29, 'view_propertytranslation'), + (113, 'Can add Menu Tree Representation', 30, 'add_exercisetreeparent'), + (114, 'Can change Menu Tree Representation', 30, 'change_exercisetreeparent'), + (115, 'Can delete Menu Tree Representation', 30, 'delete_exercisetreeparent'), + (116, 'Can view Menu Tree Representation', 30, 'view_exercisetreeparent'); /*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. auth_user @@ -95,7 +179,7 @@ CREATE TABLE IF NOT EXISTS `auth_user` ( `last_login` datetime(6) DEFAULT NULL, `is_superuser` tinyint(1) NOT NULL, `username` varchar(150) COLLATE utf8_hungarian_ci NOT NULL, - `first_name` varchar(30) COLLATE utf8_hungarian_ci NOT NULL, + `first_name` varchar(150) COLLATE utf8_hungarian_ci NOT NULL, `last_name` varchar(150) COLLATE utf8_hungarian_ci NOT NULL, `email` varchar(254) COLLATE utf8_hungarian_ci NOT NULL, `is_staff` tinyint(1) NOT NULL, @@ -108,7 +192,7 @@ CREATE TABLE IF NOT EXISTS `auth_user` ( -- Tábla adatainak mentése aitrainer2.auth_user: ~2 rows (hozzávetőleg) /*!40000 ALTER TABLE `auth_user` DISABLE KEYS */; REPLACE INTO `auth_user` (`id`, `password`, `last_login`, `is_superuser`, `username`, `first_name`, `last_name`, `email`, `is_staff`, `is_active`, `date_joined`) VALUES - (1, 'pbkdf2_sha256$180000$WhaET4L6Ebme$JTn/z9eX1S0zZVJeO0saJClgwakCR9PXIBYXQtVHBjs=', '2020-11-19 19:36:52.009635', 1, 'bossanyit', '', '', 'tibor.bossanyi@aitrainer.app', 1, 1, '2020-07-15 20:42:37.000000'), + (1, 'pbkdf2_sha256$216000$WM8bOcVk4Onx$5DC4CM8MkJE5QHougO3yMm00DJQ/sgGvJORIwNJ8FS0=', '2021-04-03 07:48:19.934730', 1, 'bossanyit', '', '', 'tibor.bossanyi@aitrainer.app', 1, 1, '2020-07-15 20:42:37.000000'), (2, 'pbkdf2_sha256$180000$KWuUPcTheOKy$r3pccArHppBYlHIPxb9bInGPLxFmLKMBUXwuPrcQ/2w=', NULL, 0, 'bossanyiz', '', '', '', 1, 1, '2020-07-15 21:17:11.000000'); /*!40000 ALTER TABLE `auth_user` ENABLE KEYS */; @@ -170,7 +254,7 @@ CREATE TABLE IF NOT EXISTS `configuration` ( -- Tábla adatainak mentése aitrainer2.configuration: ~0 rows (hozzávetőleg) /*!40000 ALTER TABLE `configuration` DISABLE KEYS */; REPLACE INTO `configuration` (`configuration_id`, `config_key`, `config_value`, `date_add`, `date_change`) VALUES - (1, 'db_version', '1.0.16', '2020-05-30 07:00:00', '2020-11-26 00:00:00'); + (1, 'db_version', '1.0.30', '2020-05-30 07:00:00', '2021-04-14 00:00:00'); /*!40000 ALTER TABLE `configuration` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. customer @@ -197,7 +281,7 @@ CREATE TABLE IF NOT EXISTS `customer` ( `firebase_uid` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, PRIMARY KEY (`customer_id`), UNIQUE KEY `firebase_uid` (`firebase_uid`) -) ENGINE=InnoDB AUTO_INCREMENT=296 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=475 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; -- Tábla adatainak mentése aitrainer2.customer: ~17 rows (hozzávetőleg) /*!40000 ALTER TABLE `customer` DISABLE KEYS */; @@ -216,11 +300,27 @@ REPLACE INTO `customer` (`customer_id`, `name`, `firstname`, `email`, `password` (12, 'Átlag 17 éves lány', '', '', NULL, 'w', 0, 'N', NULL, NULL, 1, 0, 0, 0, 0, 0, '', 'beginner', NULL, NULL), (13, 'Átlag 18 éves lány', '', '', NULL, 'w', 0, 'N', NULL, NULL, 1, 0, 0, 0, 0, 0, '', 'beginner', NULL, NULL), (54, 'Dummy User', '', 'bosi', '$2a$10$thOc8jS750c7xe9U9Qq3GuSPs/H0Pt2Ads05yzUlyzQBIj.Rk9QCy', 'm', 0, 'N', NULL, NULL, 1, 1, 0, 0, 0, 0, '', 'beginner', NULL, NULL), - (90, 'Bossi', 'Tib', 'sw@andio.biz', '123456789', 'm', 0, 'Y', NULL, NULL, 1, 1, 0, 137, 1972, 79, NULL, 'advanced', 'endomorph', NULL), - (103, 'Bos', 'Kakadu', 'sw2@andio.biz', 'blabal', 'm', 0, 'N', NULL, NULL, 0, 0, 0, 0, 1972, 79, NULL, 'intermediate', NULL, '3FirebaseU1d'), + (90, 'Bossi', 'Tib', 'sw@andio.biz', '123456', 'm', 0, 'Y', NULL, '2021-04-14 22:42:33', 1, 1, 0, 0, 1972, 79, NULL, 'advanced', 'endomorph', NULL), + (103, 'Bos', 'Kakadu', 'sw2@andio.biz', NULL, 'm', 0, 'Y', NULL, '2021-04-14 22:42:33', 1, 1, 0, 137, 1972, 79, NULL, 'intermediate', NULL, '3FirebaseU1d'), (137, 'Robert', '', NULL, NULL, 'm', NULL, 'N', NULL, NULL, 1, 0, 1, 0, 0, 0, '', 'beginner', NULL, NULL); /*!40000 ALTER TABLE `customer` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. customer_activity +CREATE TABLE IF NOT EXISTS `customer_activity` ( + `activity_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(14) NOT NULL DEFAULT 0, + `type` char(50) COLLATE utf8_hungarian_ci NOT NULL, + `date_add` datetime NOT NULL, + `skipped` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`activity_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.customer_activity: ~0 rows (hozzávetőleg) +/*!40000 ALTER TABLE `customer_activity` DISABLE KEYS */; +REPLACE INTO `customer_activity` (`activity_id`, `customer_id`, `type`, `date_add`, `skipped`) VALUES + (1, 90, 'basic_tutorial', '2021-04-13 22:49:19', 0); +/*!40000 ALTER TABLE `customer_activity` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. customer_exercise_device CREATE TABLE IF NOT EXISTS `customer_exercise_device` ( `customer_exercise_device_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -229,14 +329,14 @@ CREATE TABLE IF NOT EXISTS `customer_exercise_device` ( `date_add` datetime DEFAULT NULL, `favourite` tinyint(4) DEFAULT NULL, PRIMARY KEY (`customer_exercise_device_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.customer_exercise_device: ~2 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.customer_exercise_device: ~3 rows (hozzávetőleg) /*!40000 ALTER TABLE `customer_exercise_device` DISABLE KEYS */; REPLACE INTO `customer_exercise_device` (`customer_exercise_device_id`, `customer_id`, `exercise_device_id`, `date_add`, `favourite`) VALUES (1, 90, 1, NULL, NULL), (2, 90, 2, NULL, NULL), - (3, 90, 5, NULL, NULL); + (21, 90, 5, NULL, NULL); /*!40000 ALTER TABLE `customer_exercise_device` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. customer_information @@ -266,21 +366,24 @@ CREATE TABLE IF NOT EXISTS `customer_property` ( `property_id` int(10) unsigned NOT NULL DEFAULT 0, `property_value` double unsigned NOT NULL DEFAULT 0, `date_add` datetime DEFAULT NULL, - PRIMARY KEY (`customer_property_id`) USING BTREE, - INDEX `property_id` (`property_id`) USING BTREE, - INDEX `customer_id` (`customer_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + PRIMARY KEY (`customer_property_id`), + KEY `property_id` (`property_id`), + KEY `customer_id` (`customer_id`) +) ENGINE=InnoDB AUTO_INCREMENT=124 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.customer_property: ~7 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.customer_property: ~10 rows (hozzávetőleg) /*!40000 ALTER TABLE `customer_property` DISABLE KEYS */; REPLACE INTO `customer_property` (`customer_property_id`, `customer_id`, `property_id`, `property_value`, `date_add`) VALUES - (1, 90, 1, 81, '2020-09-09 21:53:29'), + (1, 90, 1, 81, '2021-02-15 00:00:00'), (2, 90, 1, 82, '2020-11-09 21:53:53'), (3, 90, 2, 172, '2020-09-09 21:55:18'), (4, 90, 4, 37, '2020-09-09 21:55:51'), (5, 91, 1, 67, '2020-10-09 22:12:24'), (45, 90, 1, 79, '2020-11-10 07:34:35'), - (46, 103, 1, 79, '2020-11-10 07:34:35'); + (46, 103, 1, 79, '2020-11-10 07:34:35'), + (91, 90, 5, 42, '2021-02-15 00:00:00'), + (92, 90, 6, 99, '2021-02-18 12:00:00'), + (93, 90, 7, 67, '2021-02-15 16:31:48'); /*!40000 ALTER TABLE `customer_property` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. django_admin_log @@ -298,9 +401,9 @@ CREATE TABLE IF NOT EXISTS `django_admin_log` ( KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`), CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.django_admin_log: ~60 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.django_admin_log: ~118 rows (hozzávetőleg) /*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */; REPLACE INTO `django_admin_log` (`id`, `action_time`, `object_id`, `object_repr`, `action_flag`, `change_message`, `content_type_id`, `user_id`) VALUES (1, '2020-07-15 21:17:11.320125', '2', 'bossanyiz', 1, '[{"added": {}}]', 6, 1), @@ -371,7 +474,64 @@ REPLACE INTO `django_admin_log` (`id`, `action_time`, `object_id`, `object_repr` (66, '2020-11-19 19:51:25.731297', '1', 'Weight', 2, '[]', 17, 1), (67, '2020-11-19 19:51:40.056739', '3', 'Machine', 1, '[{"added": {}}, {"added": {"name": "Translation", "object": "Edz\\u0151termi g\\u00e9p"}}]', 17, 1), (68, '2020-11-19 19:54:01.497189', '38', 'Pull Ups', 2, '[{"added": {"name": "Exercise Device", "object": "ExerciseTypeDevice object (2)"}}, {"added": {"name": "Exercise Device", "object": "ExerciseTypeDevice object (3)"}}]', 1, 1), - (69, '2020-11-24 11:43:58.417158', '3', 'Machine', 2, '[{"changed": {"fields": ["Image url"]}}]', 17, 1); + (69, '2020-11-24 11:43:58.417158', '3', 'Machine', 2, '[{"changed": {"fields": ["Image url"]}}]', 17, 1), + (70, '2020-12-02 23:31:03.595026', '1', 'ExerciseTypeAlternative object (1)', 2, '[{"changed": {"fields": ["Exercise type child"]}}]', 18, 1), + (71, '2020-12-02 23:32:09.593785', '1', 'ExerciseDeviceAlternative object (1)', 1, '[{"added": {}}]', 19, 1), + (72, '2020-12-02 23:39:46.630767', '2', 'ExerciseTypeAlternative object (2)', 1, '[{"added": {}}]', 18, 1), + (73, '2020-12-02 23:45:53.824207', '2', 'ExerciseDeviceAlternative object (2)', 1, '[{"added": {}}]', 19, 1), + (74, '2020-12-02 23:48:07.910858', '3', 'ExerciseDeviceAlternative object (3)', 1, '[{"added": {}}]', 19, 1), + (75, '2020-12-02 23:48:15.622893', '3', 'ExerciseDeviceAlternative object (3)', 3, '', 19, 1), + (76, '2020-12-02 23:50:17.468258', '4', 'ExerciseDeviceAlternative object (4)', 1, '[{"added": {}}]', 19, 1), + (77, '2020-12-02 23:50:35.367141', '4', 'ExerciseDeviceAlternative object (4)', 3, '', 19, 1), + (78, '2020-12-03 17:04:37.803875', '46', 'ExerciseTreeParents object (46)', 1, '[{"added": {}}]', 21, 1), + (79, '2020-12-03 17:05:31.472901', '47', 'ExerciseTreeParents object (47)', 1, '[{"added": {}}]', 21, 1), + (80, '2020-12-03 17:11:22.367522', '20', 'Back', 2, '[{"added": {"name": "Exercise Tree Parent", "object": "ExerciseTreeParents object (48)"}}]', 10, 1), + (81, '2020-12-03 17:11:41.941651', '20', 'Back', 2, '[{"deleted": {"name": "Exercise Tree Parent", "object": "ExerciseTreeParents object (None)"}}]', 10, 1), + (82, '2020-12-03 17:19:10.170196', '63', 'Chest Press', 2, '[{"added": {"name": "Exercise Alternative", "object": "ExerciseTypeAlternative object (3)"}}]', 1, 1), + (83, '2020-12-07 14:27:04.294495', '123', 'Faltámasz', 1, '[{"added": {}}, {"added": {"name": "Image", "object": "Menu"}}, {"added": {"name": "Translation", "object": "Faltamasz"}}, {"added": {"name": "Exercise Device", "object": "ExerciseTypeDevice object (4)"}}, {"added": {"name": "Exercise Parent", "object": "ExerciseTypeParents object (27)"}}]', 1, 1), + (84, '2021-01-29 14:11:34.071929', '13', 'Sizes', 3, '', 10, 1), + (85, '2021-01-29 14:11:34.077634', '12', 'BMR', 3, '', 10, 1), + (86, '2021-01-29 14:11:34.080124', '11', 'BMI', 3, '', 10, 1), + (87, '2021-01-29 14:21:41.816914', '3', 'Cardio', 2, '[{"changed": {"name": "Exercise Tree Parent", "object": "ExerciseTreeParents object (15)", "fields": ["Exercise tree parent"]}}]', 10, 1), + (88, '2021-01-29 14:53:36.279100', '19', 'Calf', 2, '[{"changed": {"fields": ["Image url"]}}]', 10, 1), + (89, '2021-01-29 14:54:42.386874', '3', 'Cardio', 2, '[{"changed": {"fields": ["Image url"]}}, {"changed": {"name": "Exercise Tree Parent", "object": "ExerciseTreeParents object (15)", "fields": ["Exercise tree parent"]}}]', 10, 1), + (90, '2021-01-29 14:55:25.245346', '4', 'Strength', 2, '[{"changed": {"name": "Translation", "object": "Er\\u0151!", "fields": ["Name"]}}, {"changed": {"name": "Exercise Tree Parent", "object": "ExerciseTreeParents object (16)", "fields": ["Exercise tree parent"]}}]', 10, 1), + (91, '2021-02-23 13:52:02.114493', '2', 'Own Body', 1, '[{"added": {}}, {"added": {"name": "Translation", "object": "Saj\\u00e1t testes tesztek"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (1)"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (2)"}}]', 22, 1), + (92, '2021-02-23 14:07:35.354335', '3', 'Cable Test', 1, '[{"added": {}}, {"added": {"name": "Translation", "object": "K\\u00e1beles/Szabads\\u00falyos"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (3)"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (4)"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (5)"}}]', 22, 1), + (93, '2021-02-23 14:11:27.262616', '3', 'Cable Test', 2, '[{"changed": {"fields": ["Template type"]}}]', 22, 1), + (94, '2021-02-23 16:08:56.206801', '41', 'Shoulders', 2, '[{"changed": {"fields": ["Unit quantity unit"]}}, {"added": {"name": "Translation", "object": "V\\u00e1llak"}}, {"changed": {"name": "Exercise Parent", "object": "ExerciseTypeParents object (21)", "fields": ["Exercise tree"]}}]', 1, 1), + (95, '2021-03-08 13:38:31.671571', '2', 'Own Body', 2, '[]', 22, 1), + (96, '2021-03-10 19:45:56.531912', '4', 'Strength', 2, '[{"changed": {"fields": ["Description"]}}, {"changed": {"name": "Translation", "object": "Er\\u0151!", "fields": ["Description"]}}, {"changed": {"name": "Menu Tree Representation", "object": "ExerciseTreeParents object (16)", "fields": ["Exercise tree parent"]}}]', 10, 1), + (97, '2021-04-03 07:56:41.666935', '1', 'Fekvőtámasz', 1, '[{"added": {}}]', 31, 1), + (98, '2021-04-03 07:57:09.670249', '2', 'Squats', 1, '[{"added": {}}]', 31, 1), + (99, '2021-04-03 08:41:34.321990', '1', 'Fekvőtámasz_ffi_17-19', 1, '[{"added": {}}]', 32, 1), + (100, '2021-04-03 08:43:01.722982', '2', 'Fekvőtámasz_ffi_17-19_below_avg', 1, '[{"added": {}}]', 32, 1), + (101, '2021-04-03 08:44:23.418442', '1', 'Fekvőtámasz_ffi_17-19_poor', 2, '[{"changed": {"fields": ["Name", "Evaluation text"]}}]', 32, 1), + (102, '2021-04-03 08:44:33.419069', '2', 'Fekvőtámasz_ffi_17-19_fair', 2, '[{"changed": {"fields": ["Name", "Evaluation text"]}}]', 32, 1), + (103, '2021-04-03 08:44:49.589962', '2', 'Fekvőtámasz_ffi_17-19_fair', 2, '[{"changed": {"fields": ["Age min", "Age max"]}}]', 32, 1), + (104, '2021-04-03 08:44:58.609848', '2', 'Fekvőtámasz_ffi_17-19_fair', 2, '[{"changed": {"fields": ["Age min"]}}]', 32, 1), + (105, '2021-04-03 08:45:38.252656', '3', 'Fekvőtámasz_ffi_17-19_avg', 1, '[{"added": {}}]', 32, 1), + (106, '2021-04-03 09:40:14.687710', '4', 'Fekvőtámasz_ffi_17-19_below_avg', 2, '[{"changed": {"fields": ["Name", "Value min", "Value max", "Evaluation text"]}}]', 32, 1), + (107, '2021-04-03 09:41:16.606082', '1', 'Fekvőtámasz_ffi_17-19_very_poor', 2, '[{"changed": {"fields": ["Name", "Value max", "Evaluation text"]}}]', 32, 1), + (108, '2021-04-03 09:42:31.410641', '5', 'Fekvőtámasz_ffi_17-19_poor', 2, '[{"changed": {"fields": ["Value min", "Value max"]}}]', 32, 1), + (109, '2021-04-03 09:42:31.416654', '3', 'Fekvőtámasz_ffi_17-19_avg', 2, '[{"changed": {"fields": ["Value min", "Value max"]}}]', 32, 1), + (110, '2021-04-03 09:42:50.572553', '6', 'Fekvőtámasz_ffi_17-19_above_avg', 2, '[{"changed": {"fields": ["Name"]}}]', 32, 1), + (111, '2021-04-03 09:43:24.387415', '7', 'Fekvőtámasz_ffi_17-19_good', 2, '[{"changed": {"fields": ["Name", "Value min", "Value max", "Evaluation text"]}}]', 32, 1), + (112, '2021-04-03 09:44:05.907502', '8', 'Fekvőtámasz_ffi_17-19_excellent', 2, '[{"changed": {"fields": ["Name", "Value min", "Value max", "Evaluation text"]}}]', 32, 1), + (113, '2021-04-03 09:44:29.833956', '9', 'Fekvőtámasz_ffi_17-19_elite', 2, '[{"changed": {"fields": ["Name", "Value min", "Value max"]}}]', 32, 1), + (114, '2021-04-03 09:47:50.777311', '10', 'Fekvőtámasz_ffi_20-29_very_poor', 2, '[{"changed": {"fields": ["Name", "Age min", "Age max"]}}]', 32, 1), + (115, '2021-04-10 16:16:18.576490', '10', 'Fekvőtámasz_ffi_20-29_very_poor', 3, '', 32, 1), + (116, '2021-04-10 16:16:42.237879', '19', 'Fekvőtámasz_ffi_17-19_elite_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (117, '2021-04-10 16:16:42.242748', '18', 'Fekvőtámasz_ffi_17-19_excellent_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (118, '2021-04-10 16:16:42.254305', '17', 'Fekvőtámasz_ffi_17-19_good_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (119, '2021-04-10 16:16:42.270745', '16', 'Fekvőtámasz_ffi_17-19_above_avg_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (120, '2021-04-10 16:16:42.276442', '15', 'Fekvőtámasz_ffi_17-19_poor_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (121, '2021-04-10 16:16:42.282309', '14', 'Fekvőtámasz_ffi_17-19_below_avg_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (122, '2021-04-10 16:16:42.287443', '13', 'Fekvőtámasz_ffi_17-19_avg_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (123, '2021-04-10 16:16:42.315315', '12', 'Fekvőtámasz_ffi_17-19_fair_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (124, '2021-04-10 16:16:42.330138', '11', 'Fekvőtámasz_ffi_17-19_very_poor_copy', 2, '[{"changed": {"fields": ["Sex"]}}]', 32, 1), + (125, '2021-04-14 05:11:23.311486', '2', 'Own Body', 2, '[{"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (6)"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (7)"}}, {"added": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (8)"}}, {"changed": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (1)", "fields": ["Sort"]}}, {"changed": {"name": "Exercise Plan Template Detail", "object": "ExercisePlanTemplateDetail object (2)", "fields": ["Sort"]}}]', 22, 1), + (126, '2021-04-14 05:11:50.932156', '2', 'Own Body', 2, '[]', 22, 1); /*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. django_content_type @@ -381,22 +541,37 @@ CREATE TABLE IF NOT EXISTS `django_content_type` ( `model` varchar(100) COLLATE utf8_hungarian_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.django_content_type: ~16 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.django_content_type: ~29 rows (hozzávetőleg) /*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */; REPLACE INTO `django_content_type` (`id`, `app_label`, `model`) VALUES (3, 'admin', 'logentry'), (14, 'aitrainer_backoffice', 'customerproduct'), + (31, 'aitrainer_backoffice', 'evaluation'), + (32, 'aitrainer_backoffice', 'evaluationattribute'), (17, 'aitrainer_backoffice', 'exercisedevice'), + (19, 'aitrainer_backoffice', 'exercisedevicealternative'), + (23, 'aitrainer_backoffice', 'exercisedevicetranslation'), (11, 'aitrainer_backoffice', 'exerciseplan'), (12, 'aitrainer_backoffice', 'exerciseplandetail'), + (22, 'aitrainer_backoffice', 'exerciseplantemplate'), + (27, 'aitrainer_backoffice', 'exerciseplantemplatedetail'), + (26, 'aitrainer_backoffice', 'exerciseplantemplatetranslation'), + (28, 'aitrainer_backoffice', 'exerciseplantranslation'), (10, 'aitrainer_backoffice', 'exercisetree'), + (30, 'aitrainer_backoffice', 'exercisetreeparent'), + (21, 'aitrainer_backoffice', 'exercisetreeparents'), + (24, 'aitrainer_backoffice', 'exercisetreetranslation'), (1, 'aitrainer_backoffice', 'exercisetype'), + (18, 'aitrainer_backoffice', 'exercisetypealternative'), + (25, 'aitrainer_backoffice', 'exercisetypedevice'), (2, 'aitrainer_backoffice', 'exercisetypeimage'), + (20, 'aitrainer_backoffice', 'exercisetypeparents'), (9, 'aitrainer_backoffice', 'exercisetypetranslation'), (13, 'aitrainer_backoffice', 'product'), (16, 'aitrainer_backoffice', 'property'), + (29, 'aitrainer_backoffice', 'propertytranslation'), (15, 'aitrainer_backoffice', 'purchase'), (5, 'auth', 'group'), (4, 'auth', 'permission'), @@ -412,7 +587,7 @@ CREATE TABLE IF NOT EXISTS `django_migrations` ( `name` varchar(255) COLLATE utf8_hungarian_ci NOT NULL, `applied` datetime(6) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; -- Tábla adatainak mentése aitrainer2.django_migrations: ~17 rows (hozzávetőleg) /*!40000 ALTER TABLE `django_migrations` DISABLE KEYS */; @@ -433,7 +608,8 @@ REPLACE INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES (14, 'auth', '0009_alter_user_last_name_max_length', '2020-07-15 20:37:58.405310'), (15, 'auth', '0010_alter_group_name_max_length', '2020-07-15 20:37:58.506876'), (16, 'auth', '0011_update_proxy_permissions', '2020-07-15 20:37:58.525870'), - (17, 'sessions', '0001_initial', '2020-07-15 20:37:58.638091'); + (17, 'sessions', '0001_initial', '2020-07-15 20:37:58.638091'), + (18, 'auth', '0012_alter_user_first_name_max_length', '2021-03-07 10:22:04.975004'); /*!40000 ALTER TABLE `django_migrations` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. django_session @@ -445,17 +621,77 @@ CREATE TABLE IF NOT EXISTS `django_session` ( KEY `django_session_expire_date_a5c62663` (`expire_date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.django_session: ~6 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.django_session: ~9 rows (hozzávetőleg) /*!40000 ALTER TABLE `django_session` DISABLE KEYS */; REPLACE INTO `django_session` (`session_key`, `session_data`, `expire_date`) VALUES ('6oeeoxy9mt0kdbjgmvhl74qeqpefxaox', 'OWQ2YmUzOGUyZjA1MmRmNDFhYjU5MDQ3ODMzZmNkZWZkYjQ2MjA2MDp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiJmM2ZiZmYzNWVjOTljMWEwZjk3OTg2MjM3Nzg4MGY5M2I0MDY5OGI0In0=', '2020-07-29 20:45:32.410329'), + ('afbme1v13b58innuza5szcfchl64nvvu', '.eJxVjEEOwiAQRe_C2pBCEQeX7j0DGWYGqRpISrsy3l2bdKHb_977LxVxXUpcu8xxYnVWRh1-t4T0kLoBvmO9NU2tLvOU9KbonXZ9bSzPy-7-HRTs5VuTA2_4GAACOvQmQyDJYxjIWhrF8kAnB5CAgEa2Fr1Q9gYEk0seRb0_4TQ4cw:1lEXtq:wMeSKls2_4ZTciQorIb-koU_quHWb0FfNYF041-HqHs', '2021-03-09 13:38:50.417387'), + ('eo9fdqg9ofk57n2z9rzsuc2nn3hfk7i0', '.eJxVjEEOwiAQRe_C2pBCEQeX7j0DGWYGqRpISrsy3l2bdKHb_977LxVxXUpcu8xxYnVWRh1-t4T0kLoBvmO9NU2tLvOU9KbonXZ9bSzPy-7-HRTs5VuTA2_4GAACOvQmQyDJYxjIWhrF8kAnB5CAgEa2Fr1Q9gYEk0seRb0_4TQ4cw:1lSb11:kEoxPyCbohAdSp3FaE1Wu3zoDN3HJ8rYCTbAGfN9GWM', '2021-04-17 07:48:19.950703'), + ('f8vz2cgttfe2ea3xl6w00zwq2fgt4uwc', '.eJxVjEEOwiAQRe_C2pBCEQeX7j0DGWYGqRpISrsy3l2bdKHb_977LxVxXUpcu8xxYnVWRh1-t4T0kLoBvmO9NU2tLvOU9KbonXZ9bSzPy-7-HRTs5VuTA2_4GAACOvQmQyDJYxjIWhrF8kAnB5CAgEa2Fr1Q9gYEk0seRb0_4TQ4cw:1lK4ki:qcnK5JnW0jtkPVbgR8vn3X7phoFN73MP2jquJPN7Ej0', '2021-03-24 19:44:16.153410'), ('j85p9jioio21gkg781wlih3ai1p8wrwv', 'OWFmMzBlYmEzMzE4YWZhMzQyYzY2ZDljNmMxZmFmNWJkMTZlN2Q5Yjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4M2ExMzllOTNmZDVlYmI4ODE1NWZkZWZjMjg3NWQ2NTAxNzJmNzNjIn0=', '2020-12-03 19:36:52.014607'), ('job30dq18a2wr4upc589m348alh30yh2', 'OWFmMzBlYmEzMzE4YWZhMzQyYzY2ZDljNmMxZmFmNWJkMTZlN2Q5Yjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4M2ExMzllOTNmZDVlYmI4ODE1NWZkZWZjMjg3NWQ2NTAxNzJmNzNjIn0=', '2020-08-01 14:20:28.190449'), ('q016xqrxq3sxlr4j4cl1qoxq9kr648rv', 'OWFmMzBlYmEzMzE4YWZhMzQyYzY2ZDljNmMxZmFmNWJkMTZlN2Q5Yjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4M2ExMzllOTNmZDVlYmI4ODE1NWZkZWZjMjg3NWQ2NTAxNzJmNzNjIn0=', '2020-09-02 07:18:27.193037'), + ('qa4e9t0oqmk37n9ffcqpmi5spjskusfg', '.eJxVjEEOwiAQRe_C2pBCEQeX7j0DGWYGqRpISrsy3l2bdKHb_977LxVxXUpcu8xxYnVWRh1-t4T0kLoBvmO9NU2tLvOU9KbonXZ9bSzPy-7-HRTs5VuTA2_4GAACOvQmQyDJYxjIWhrF8kAnB5CAgEa2Fr1Q9gYEk0seRb0_4TQ4cw:1kmHS4:fw0-gLpqVdJEcVJ-LR7D9_lFQrMwCUtXEgRy5wblui4', '2020-12-21 14:25:20.086431'), ('qdpx64cx2773smyq1gr9fu3djm7ewhcs', 'OWFmMzBlYmEzMzE4YWZhMzQyYzY2ZDljNmMxZmFmNWJkMTZlN2Q5Yjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4M2ExMzllOTNmZDVlYmI4ODE1NWZkZWZjMjg3NWQ2NTAxNzJmNzNjIn0=', '2020-08-16 15:08:37.232059'), + ('tix6noqg5bva8uzbiw30robqt2ouq1wr', '.eJxVjEEOwiAQRe_C2pBCEQeX7j0DGWYGqRpISrsy3l2bdKHb_977LxVxXUpcu8xxYnVWRh1-t4T0kLoBvmO9NU2tLvOU9KbonXZ9bSzPy-7-HRTs5VuTA2_4GAACOvQmQyDJYxjIWhrF8kAnB5CAgEa2Fr1Q9gYEk0seRb0_4TQ4cw:1l5UUK:XidZ1ah73-UDizwVUB_zlLyATo-o4Wf1cTRR6rirjeU', '2021-02-12 14:11:04.890943'), ('zwofo82y064pwz0x13qzq40bhn2gcg5d', 'OWFmMzBlYmEzMzE4YWZhMzQyYzY2ZDljNmMxZmFmNWJkMTZlN2Q5Yjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4M2ExMzllOTNmZDVlYmI4ODE1NWZkZWZjMjg3NWQ2NTAxNzJmNzNjIn0=', '2020-11-18 06:31:44.669865'); /*!40000 ALTER TABLE `django_session` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. evaluation +CREATE TABLE IF NOT EXISTS `evaluation` ( + `evaluation_id` int(11) NOT NULL AUTO_INCREMENT, + `exercise_type_id` int(11) NOT NULL, + `name` char(100) COLLATE utf8_hungarian_ci DEFAULT NULL, + `unit` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL COMMENT 'repeats, second, etc', + PRIMARY KEY (`evaluation_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.evaluation: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `evaluation` DISABLE KEYS */; +REPLACE INTO `evaluation` (`evaluation_id`, `exercise_type_id`, `name`, `unit`) VALUES + (1, 33, 'PushUps', 'repeats'), + (2, 35, 'Squats', 'repeats'); +/*!40000 ALTER TABLE `evaluation` ENABLE KEYS */; + +-- Struktúra mentése tábla aitrainer2. evaluation_attribute +CREATE TABLE IF NOT EXISTS `evaluation_attribute` ( + `evaluation_attr_id` int(11) NOT NULL AUTO_INCREMENT, + `evaluation_id` int(11) NOT NULL, + `name` char(50) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '', + `age_min` int(3) NOT NULL DEFAULT 0, + `age_max` int(3) NOT NULL DEFAULT 0, + `value_min` double NOT NULL DEFAULT 0, + `value_max` double NOT NULL DEFAULT 0, + `sex` enum('m','w') COLLATE utf8_hungarian_ci NOT NULL DEFAULT 'm', + `evaluation_text` char(50) COLLATE utf8_hungarian_ci NOT NULL, + `suggestion` text COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`evaluation_attr_id`) USING BTREE, + KEY `evalutation_id` (`evaluation_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.evaluation_attribute: ~18 rows (hozzávetőleg) +/*!40000 ALTER TABLE `evaluation_attribute` DISABLE KEYS */; +REPLACE INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES + (1, 1, 'Fekvőtámasz_ffi_17-19_very_poor', 17, 19, 0, 4, 'm', 'very_poor', NULL), + (2, 1, 'Fekvőtámasz_ffi_17-19_fair', 17, 19, 20, 34, 'm', 'fair', NULL), + (3, 1, 'Fekvőtámasz_ffi_17-19_avg', 17, 19, 19, 34, 'm', 'average', NULL), + (4, 1, 'Fekvőtámasz_ffi_17-19_below_avg', 17, 19, 10, 18, 'm', 'below_average', NULL), + (5, 1, 'Fekvőtámasz_ffi_17-19_poor', 17, 19, 4, 10, 'm', 'poor', NULL), + (6, 1, 'Fekvőtámasz_ffi_17-19_above_avg', 17, 19, 19, 34, 'm', 'average', NULL), + (7, 1, 'Fekvőtámasz_ffi_17-19_good', 17, 19, 47, 56, 'm', 'good', NULL), + (8, 1, 'Fekvőtámasz_ffi_17-19_excellent', 17, 19, 56, 99, 'm', 'excellent', NULL), + (9, 1, 'Fekvőtámasz_ffi_17-19_elite', 17, 19, 100, 100000, 'm', 'excellent', NULL), + (11, 1, 'Fekvőtámasz_ffi_17-19_very_poor_copy', 17, 19, 0, 4, 'w', 'very_poor', NULL), + (12, 1, 'Fekvőtámasz_ffi_17-19_fair_copy', 17, 19, 20, 34, 'w', 'fair', NULL), + (13, 1, 'Fekvőtámasz_ffi_17-19_avg_copy', 17, 19, 19, 34, 'w', 'average', NULL), + (14, 1, 'Fekvőtámasz_ffi_17-19_below_avg_copy', 17, 19, 10, 18, 'w', 'below_average', NULL), + (15, 1, 'Fekvőtámasz_ffi_17-19_poor_copy', 17, 19, 4, 10, 'w', 'poor', NULL), + (16, 1, 'Fekvőtámasz_ffi_17-19_above_avg_copy', 17, 19, 19, 34, 'w', 'average', NULL), + (17, 1, 'Fekvőtámasz_ffi_17-19_good_copy', 17, 19, 47, 56, 'w', 'good', NULL), + (18, 1, 'Fekvőtámasz_ffi_17-19_excellent_copy', 17, 19, 56, 99, 'w', 'excellent', NULL), + (19, 1, 'Fekvőtámasz_ffi_17-19_elite_copy', 17, 19, 100, 100000, 'w', 'excellent', NULL); +/*!40000 ALTER TABLE `evaluation_attribute` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercises CREATE TABLE IF NOT EXISTS `exercises` ( `exercise_id` int(11) NOT NULL AUTO_INCREMENT, @@ -470,17 +706,35 @@ CREATE TABLE IF NOT EXISTS `exercises` ( PRIMARY KEY (`exercise_id`), KEY `exercise_type_id` (`exercise_type_id`), KEY `customer_id` (`customer_id`) -) ENGINE=InnoDB AUTO_INCREMENT=167 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=337 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.exercises: ~4 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercises: ~6 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercises` DISABLE KEYS */; REPLACE INTO `exercises` (`exercise_id`, `exercise_type_id`, `customer_id`, `date_add`, `quantity`, `unit`, `unit_quantity`, `rest_time`, `exercise_plan_detail_id`) VALUES (1, 1, 1, '2020-05-01 00:00:00', 12.2, 'repeat', NULL, NULL, 0), (2, 3, 11, '2020-05-13 04:32:00', 100, 'repeat', 30, NULL, 0), (69, 2, 1, '2020-05-14 03:43:45', 30, 'repeat', 12, NULL, 0), - (70, 2, 1, '2020-04-04 03:43:45', 50, 'repeat', 40, NULL, 0); + (70, 2, 1, '2020-04-04 03:43:45', 50, 'repeat', 40, NULL, 0), + (215, 37, 90, '2021-02-04 03:43:45', 40, 'repeat', 20, NULL, 0), + (285, 2, 90, '2021-04-03 15:11:08', 34, 'repeat', 50, NULL, 0); /*!40000 ALTER TABLE `exercises` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_ability +CREATE TABLE IF NOT EXISTS `exercise_ability` ( + `exercise_ability_id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, + `description` varchar(200) COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`exercise_ability_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_ability: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_ability` DISABLE KEYS */; +REPLACE INTO `exercise_ability` (`exercise_ability_id`, `name`, `description`) VALUES + (1, '1RM', 'One Rep Max'), + (2, 'Endurance', NULL), + (3, 'Cardio', NULL); +/*!40000 ALTER TABLE `exercise_ability` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_device CREATE TABLE IF NOT EXISTS `exercise_device` ( `exercise_device_id` int(11) NOT NULL AUTO_INCREMENT, @@ -492,16 +746,31 @@ CREATE TABLE IF NOT EXISTS `exercise_device` ( PRIMARY KEY (`exercise_device_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.exercise_device: ~2 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercise_device: ~5 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_device` DISABLE KEYS */; REPLACE INTO `exercise_device` (`exercise_device_id`, `name`, `description`, `image_url`, `sort`, `place`) VALUES (1, 'Weight', NULL, NULL, 5, 0), - (2, 'Own Weight', NULL, NULL, 4, 0), - (3, 'Machine', '', 'images/csengo2.png', 3, 0), + (2, 'Own Weight', NULL, 'images/csengo2.png', 4, 0), + (3, 'Machine', NULL, 'images/csengo2.png', 3, 0), (4, 'HOME', NULL, NULL, 1, 1), - (5, 'STREET', NULL, NULL, 2, 1); + (5, 'STREET', NULL, 'images/csengo2.png', 2, 1); /*!40000 ALTER TABLE `exercise_device` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_device_alternative +CREATE TABLE IF NOT EXISTS `exercise_device_alternative` ( + `exercise_device_alternative_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `exercise_device_parent_id` int(11) NOT NULL DEFAULT 0, + `exercise_device_child_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`exercise_device_alternative_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_device_alternative: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_device_alternative` DISABLE KEYS */; +REPLACE INTO `exercise_device_alternative` (`exercise_device_alternative_id`, `exercise_device_parent_id`, `exercise_device_child_id`) VALUES + (1, 4, 2), + (2, 2, 5); +/*!40000 ALTER TABLE `exercise_device_alternative` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_device_translation CREATE TABLE IF NOT EXISTS `exercise_device_translation` ( `translation_id` int(11) NOT NULL AUTO_INCREMENT, @@ -530,17 +799,20 @@ CREATE TABLE IF NOT EXISTS `exercise_plan` ( `date_add` datetime DEFAULT NULL, `date_upd` datetime DEFAULT NULL, `type` char(50) DEFAULT NULL, - `exercise_plan_template_id` INT(11) NULL DEFAULT NULL, + `exercise_plan_template_id` int(11) DEFAULT NULL, PRIMARY KEY (`exercise_plan_id`) -) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=242 DEFAULT CHARSET=utf8mb4; --- Tábla adatainak mentése aitrainer2.exercise_plan: ~4 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercise_plan: ~7 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 +REPLACE INTO `exercise_plan` (`exercise_plan_id`, `customer_id`, `name`, `description`, `private`, `date_add`, `date_upd`, `type`, `exercise_plan_template_id`) VALUES (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); + (20, 90, 'Boss private 2', NULL, 1, '2020-09-09 00:06:19', NULL, NULL, NULL), + (178, 90, 'Boss custom', NULL, 1, '2021-03-25 20:43:00', '2021-03-25 20:43:01', 'mini_test_set', NULL), + (187, 90, 'Bossanyi private 3', '', 1, '2021-03-25 17:00:00', NULL, 'custom', NULL), + (190, 90, 'Bossanyi private 3', '', 1, '2021-03-25 17:00:00', NULL, 'custom', NULL); /*!40000 ALTER TABLE `exercise_plan` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. exercise_plan_detail @@ -552,7 +824,7 @@ CREATE TABLE IF NOT EXISTS `exercise_plan_detail` ( `repeats` int(11) DEFAULT NULL, `weight_equation` char(50) DEFAULT NULL, PRIMARY KEY (`exercise_plan_detail_id`) -) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8mb4; -- Tábla adatainak mentése aitrainer2.exercise_plan_detail: ~5 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_plan_detail` DISABLE KEYS */; @@ -564,6 +836,68 @@ REPLACE INTO `exercise_plan_detail` (`exercise_plan_detail_id`, `exercise_plan_i (5, 6, 40, 12, 3, '40'); /*!40000 ALTER TABLE `exercise_plan_detail` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_plan_template +CREATE TABLE IF NOT EXISTS `exercise_plan_template` ( + `exercise_plan_template_id` int(11) NOT NULL AUTO_INCREMENT, + `template_type` enum('special','mini_test_set') COLLATE utf8_hungarian_ci DEFAULT NULL, + `name` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, + `description` text COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`exercise_plan_template_id`) USING BTREE, + KEY `template_type` (`template_type`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_plan_template: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_plan_template` DISABLE KEYS */; +REPLACE INTO `exercise_plan_template` (`exercise_plan_template_id`, `template_type`, `name`, `description`) VALUES + (2, 'mini_test_set', 'Own Body', 'Own Body test'), + (3, 'mini_test_set', 'Cable Test', ''); +/*!40000 ALTER TABLE `exercise_plan_template` ENABLE KEYS */; + +-- Struktúra mentése tábla aitrainer2. exercise_plan_template_detail +CREATE TABLE IF NOT EXISTS `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 DEFAULT 0, + `quantity_unit_quantity` double DEFAULT 0, + `serie` int(11) DEFAULT 0, + `resting_time` time DEFAULT '00:00:00', + `sort` tinyint(2) DEFAULT NULL, + PRIMARY KEY (`exercise_plan_template_detail_id`) USING BTREE, + KEY `exercise_type_id` (`exercise_type_id`) USING BTREE, + KEY `exercise_plan_template_id` (`exercise_plan_template_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_plan_template_detail: ~8 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_plan_template_detail` DISABLE KEYS */; +REPLACE INTO `exercise_plan_template_detail` (`exercise_plan_template_detail_id`, `exercise_plan_template_id`, `exercise_type_id`, `quantity`, `quantity_unit_quantity`, `serie`, `resting_time`, `sort`) VALUES + (1, 2, 2, NULL, NULL, NULL, NULL, 1), + (2, 2, 6, NULL, NULL, NULL, NULL, 2), + (3, 3, 6, NULL, NULL, NULL, NULL, 1), + (4, 3, 33, NULL, NULL, NULL, NULL, 2), + (5, 3, 35, NULL, NULL, NULL, NULL, 3), + (6, 2, 33, NULL, NULL, NULL, NULL, 1), + (7, 2, 39, NULL, NULL, NULL, NULL, 2), + (8, 2, 36, NULL, NULL, NULL, NULL, 3); +/*!40000 ALTER TABLE `exercise_plan_template_detail` ENABLE KEYS */; + +-- Struktúra mentése tábla aitrainer2. exercise_plan_template_translation +CREATE TABLE IF NOT EXISTS `exercise_plan_template_translation` ( + `translation_id` int(11) NOT NULL AUTO_INCREMENT, + `exercise_plan_template_id` int(11) DEFAULT NULL, + `language_code` char(2) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '0', + `name` char(50) COLLATE utf8_hungarian_ci DEFAULT '0', + `description` text COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`translation_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_plan_template_translation: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_plan_template_translation` DISABLE KEYS */; +REPLACE INTO `exercise_plan_template_translation` (`translation_id`, `exercise_plan_template_id`, `language_code`, `name`, `description`) VALUES + (2, 2, 'hu', 'Saját testes tesztek', ''), + (3, 3, 'hu', 'Kábeles/Szabadsúlyos', ''); +/*!40000 ALTER TABLE `exercise_plan_template_translation` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_plan_translation CREATE TABLE IF NOT EXISTS `exercise_plan_translation` ( `translation_id` int(11) NOT NULL AUTO_INCREMENT, @@ -581,6 +915,28 @@ REPLACE INTO `exercise_plan_translation` (`translation_id`, `language_code`, `na (2, 'hu', 'Chuck Norris', '', 4); /*!40000 ALTER TABLE `exercise_plan_translation` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_result +CREATE TABLE IF NOT EXISTS `exercise_result` ( + `exercise_result_id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) NOT NULL DEFAULT 0, + `exercise_id` int(11) DEFAULT 0, + `exercise_plan_id` int(11) DEFAULT 0, + `result_type` char(50) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '', + `value` double NOT NULL, + `date_from` datetime DEFAULT NULL, + `date_to` datetime DEFAULT NULL, + PRIMARY KEY (`exercise_result_id`) +) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_result: ~4 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_result` DISABLE KEYS */; +REPLACE INTO `exercise_result` (`exercise_result_id`, `customer_id`, `exercise_id`, `exercise_plan_id`, `result_type`, `value`, `date_from`, `date_to`) VALUES + (1, 90, 1, 0, 'calorie', 134, '2020-12-12 10:56:45', NULL), + (2, 90, 2, 0, 'fatburn', 31, '2020-12-12 10:57:00', NULL), + (3, 90, 1, 0, 'development', 11.1, '2020-12-12 10:57:28', NULL), + (4, 90, 1, 0, 'bpm_min', 113, '2020-12-12 10:57:52', NULL); +/*!40000 ALTER TABLE `exercise_result` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_tree CREATE TABLE IF NOT EXISTS `exercise_tree` ( `tree_id` int(11) NOT NULL AUTO_INCREMENT, @@ -588,59 +944,91 @@ CREATE TABLE IF NOT EXISTS `exercise_tree` ( `description` text DEFAULT NULL, `image_url` char(200) DEFAULT NULL, `active` tinyint(1) DEFAULT 1, - PRIMARY KEY (`tree_id`) USING BTREE, - KEY `parent_id` (`parent_id`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4; + PRIMARY KEY (`tree_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4; --- Tábla adatainak mentése aitrainer2.exercise_tree: ~3 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercise_tree: ~15 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_tree` DISABLE KEYS */; REPLACE INTO `exercise_tree` (`tree_id`, `name`, `description`, `image_url`, `active`) VALUES -(3, 'Cardio', NULL, 'images/1.cardio.png', 1), -(4, 'Strength', NULL, 'images/2.strength.png', 1), -(5, 'Body Compositions', NULL, 'images/3.bcs1.png', 1), -(7, 'Aerob', NULL, 'images/1.1.aerob.png', 1), -(8, 'Anaerob', NULL, 'images/1.2.anaerob.png', 1), -(9, 'One Rep Max', NULL, 'images/2.2.1.1RM.png', 1), -(10, 'Endurance', NULL, 'images/2.1.endurance.png', 1), -(11, 'BMI', NULL, 'images/3.1.BMI.png', 0), -(12, 'BMR', NULL, 'images/3.2.BMR.png', 0), -(13, 'Sizes', NULL, 'images/3.3.sizes.png', 0), -(14, 'Chest', NULL, 'images/2.2.1.1.chestpress.png', 1), -(15, 'Biceps', NULL, 'images/2.2.1.3.biceps.png', 1), -(16, 'Triceps', NULL, 'images/2.2.1.4.triceps.png', 1), -(17, 'Shoulders', NULL, 'images/2.2.1.5.shoulders.png', 1), -(18, 'Thigh', NULL, 'images/2.1.4.squats.png', 1), -(19, 'Calf', NULL, 'images/2.1.4.squats.png', 1), -(20, 'Back', NULL, 'images/2.2.1.5.shoulders.png', 1); -(21, 'Test Center', "Welcome", 'images/2.2.1.5.shoulders.png', 1); + (3, 'Cardio', NULL, 'images/1.cardio.jpg', 1), + (4, 'Strength', 'Muscle Building / Shape', 'images/2.strength.png', 1), + (5, 'Body Compositions', NULL, 'images/3.bcs1.png', 1), + (6, '1RM', NULL, 'images/2.2.1.1RM.png', 1), + (7, 'Aerob', NULL, 'images/1.1.aerob.png', 1), + (8, 'Anaerob', NULL, 'images/1.2.anaerob.png', 1), + (9, 'One Rep Max', NULL, 'images/2.2.1.1RM.png', 1), + (10, 'Endurance', NULL, 'images/2.1.endurance.png', 1), + (14, 'Chest', NULL, 'images/2.2.1.1.chestpress.png', 1), + (15, 'Biceps', NULL, 'images/2.2.1.3.biceps.png', 1), + (16, 'Triceps', NULL, 'images/2.2.1.4.triceps.png', 1), + (17, 'Shoulders', NULL, 'images/2.2.1.5.shoulders.png', 1), + (18, 'Thigh', NULL, 'images/2.1.4.squats.png', 1), + (19, 'Calf', NULL, 'images/calf.jpg', 1), + (20, 'Back', NULL, 'images/2.2.1.5.shoulders.png', 1), + (21, 'Test Center', 'Welcome', 'images/2.strength.png', 1); +/*!40000 ALTER TABLE `exercise_tree` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_tree_ability +CREATE TABLE IF NOT EXISTS `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, + KEY `exercise_tree_id` (`exercise_tree_id`) USING BTREE, + KEY `exercise_ability_id` (`exercise_ability_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_tree_ability: ~0 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_tree_ability` DISABLE KEYS */; +REPLACE INTO `exercise_tree_ability` (`exercise_tree_ability_id`, `exercise_tree_id`, `exercise_ability_id`) VALUES + (1, 3, 3); +/*!40000 ALTER TABLE `exercise_tree_ability` ENABLE KEYS */; + +-- Struktúra mentése tábla aitrainer2. exercise_tree_parents CREATE TABLE IF NOT EXISTS `exercise_tree_parents` ( `exercise_tree_parents_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `exercise_tree_parent_id` int(11) NOT NULL DEFAULT 0, `exercise_tree_child_id` int(11) NOT NULL DEFAULT 0, - `sort` INT(3) NULL DEFAULT '0', + `sort` int(3) DEFAULT 0, + `tn_ancestors_pks` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `tn_ancestors_count` tinyint(4) DEFAULT NULL, + `tn_children_pks` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `tn_children_count` tinyint(4) DEFAULT NULL, + `tn_depth` tinyint(4) DEFAULT NULL, + `tn_descendants_pks` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `tn_descendants_count` tinyint(4) DEFAULT NULL, + `tn_index` tinyint(4) DEFAULT NULL, + `tn_level` tinyint(4) DEFAULT NULL, + `tn_parent_id` int(13) DEFAULT NULL, + `tn_priority` tinyint(4) DEFAULT NULL, + `tn_order` tinyint(4) DEFAULT NULL, + `tn_siblings_pks` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `tn_siblings_count` tinyint(4) DEFAULT NULL, PRIMARY KEY (`exercise_tree_parents_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; - -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (15, 0, 3, 3); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (16, 0, 4, 2); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (17, 0, 5, 4); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (18, 2, 6, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (20, 3, 8, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (19, 3, 7, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (21, 4, 9, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (22, 4, 10, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (32, 9, 20, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (31, 9, 19, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (30, 9, 18, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (29, 9, 17, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (28, 9, 16, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (27, 9, 15, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (26, 9, 14, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (46, 10, 20, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (47, 10, 15, 0); -INSERT INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`) VALUES (49, 0, 21, 1); - +) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +-- Tábla adatainak mentése aitrainer2.exercise_tree_parents: ~17 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_tree_parents` DISABLE KEYS */; +REPLACE INTO `exercise_tree_parents` (`exercise_tree_parents_id`, `exercise_tree_parent_id`, `exercise_tree_child_id`, `sort`, `tn_ancestors_pks`, `tn_ancestors_count`, `tn_children_pks`, `tn_children_count`, `tn_depth`, `tn_descendants_pks`, `tn_descendants_count`, `tn_index`, `tn_level`, `tn_parent_id`, `tn_priority`, `tn_order`, `tn_siblings_pks`, `tn_siblings_count`) VALUES + (15, 0, 3, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (16, 0, 4, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (17, 0, 5, 4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (18, 2, 6, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (19, 3, 7, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (20, 3, 8, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (21, 4, 9, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (22, 4, 10, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (26, 9, 14, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (27, 9, 15, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (28, 9, 16, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (29, 9, 17, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (30, 9, 18, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (31, 9, 19, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (32, 9, 20, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (46, 10, 20, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (47, 10, 15, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (49, 0, 21, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +/*!40000 ALTER TABLE `exercise_tree_parents` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. exercise_tree_translation CREATE TABLE IF NOT EXISTS `exercise_tree_translation` ( @@ -651,34 +1039,32 @@ CREATE TABLE IF NOT EXISTS `exercise_tree_translation` ( `description` text DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `tree_id` (`tree_id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4; --- Tábla adatainak mentése aitrainer2.exercise_tree_translation: ~2 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercise_tree_translation: ~14 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_tree_translation` DISABLE KEYS */; -REPLACE INTO `exercise_tree_translation` (`translation_id`, `tree_id`, `language_code`, `name`) VALUES -(1, 3, 'hu', 'Kardió', NULL), -(2, 4, 'hu', 'Erő', NULL), -(4, 7, 'hu', 'Aerob', NULL), -(5, 8, 'hu', 'Anaerob', NULL), -(6, 9, 'hu', 'Max Erő', NULL), -(7, 10, 'hu', 'Erő állóképesség', NULL), -(8, 11, 'hu', 'Testtömegindex', NULL), -(9, 12, 'hu', 'Anyagcsere', NULL), -(10, 13, 'hu', 'Méretek', NULL), -(11, 14, 'hu', 'Mellizom', NULL), -(12, 15, 'hu', 'Bicepsz', NULL), -(13, 16, 'hu', 'Tricepsz', NULL), -(14, 17, 'hu', 'Vállak', NULL), -(15, 18, 'hu', 'Comb', NULL), -(16, 19, 'hu', 'Vádli', NULL), -(17, 20, 'hu', 'Hát', NULL); -(18, 21, 'hu', 'Test Center', "Üdv"); +REPLACE INTO `exercise_tree_translation` (`translation_id`, `tree_id`, `language_code`, `name`, `description`) VALUES + (1, 3, 'hu', 'Kardió', NULL), + (2, 4, 'hu', 'Erő!', 'Izomépítés / Alakformálás'), + (3, 6, 'hu', '1RM', NULL), + (4, 7, 'hu', 'Aerob', NULL), + (5, 8, 'hu', 'Anaerob', NULL), + (6, 9, 'hu', 'Max Erő', NULL), + (7, 10, 'hu', 'Erő állóképesség', NULL), + (11, 14, 'hu', 'Mellizom', NULL), + (12, 15, 'hu', 'Bicepsz', NULL), + (13, 16, 'hu', 'Tricepsz', NULL), + (14, 17, 'hu', 'Vállak', NULL), + (15, 18, 'hu', 'Comb', NULL), + (16, 19, 'hu', 'Vádli', NULL), + (17, 20, 'hu', 'Hát', NULL), + (18, 21, 'hu', 'Tesztközpont', 'Üdv'); /*!40000 ALTER TABLE `exercise_tree_translation` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. exercise_type CREATE TABLE IF NOT EXISTS `exercise_type` ( `exercise_type_id` int(11) NOT NULL AUTO_INCREMENT, - `tree_id` int(11) NOT NULL, + `tree_id` int(11) DEFAULT NULL, `name` char(100) COLLATE utf8_hungarian_ci NOT NULL, `description` varchar(1000) COLLATE utf8_hungarian_ci DEFAULT NULL, `unit` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, @@ -688,9 +1074,9 @@ CREATE TABLE IF NOT EXISTS `exercise_type` ( `base` tinyint(1) DEFAULT 0, PRIMARY KEY (`exercise_type_id`) USING BTREE, KEY `tree_id` (`tree_id`) -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=174 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.exercise_type: ~26 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.exercise_type: ~27 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_type` DISABLE KEYS */; REPLACE INTO `exercise_type` (`exercise_type_id`, `tree_id`, `name`, `description`, `unit`, `unit_quantity`, `unit_quantity_unit`, `active`, `base`) VALUES (1, 0, 'Melső fekvőtámasz 1 perc', 'Ezt igazolja a 2016 márciusában beállított guinness rekord is,\r\namelyben KJ Joseph 1 perc alatt 82 szabályos karhajlítás-nyújtást\r\nvégzett.', 'repeat', 60, 'second', NULL, 0), @@ -715,12 +1101,29 @@ REPLACE INTO `exercise_type` (`exercise_type_id`, `tree_id`, `name`, `descriptio (38, 4, 'Pull Ups', '', 'repeat', NULL, NULL, 1, 0), (39, 0, 'Biceps', '', 'repeat', 1, 'kg', 1, 0), (40, 4, 'Triceps', 'Triceps', 'repeat', 1, NULL, 1, 1), - (41, 0, 'Shoulders', '', 'repeat', 1, 'kg', 1, 0), + (41, 0, 'Shoulders', '', 'repeat', 1, NULL, 1, 0), (42, 5, 'BMI', '', 'percent', 0, NULL, 1, 0), (43, 0, 'BMR', '', 'calorie', NULL, NULL, NULL, 0), - (63, 4, 'Chest Press', '', 'repeat', 0, 'kilogram', 1, 1); + (63, 4, 'Chest Press', '', 'repeat', 0, 'kilogram', 1, 1), + (123, 0, 'Faltámasz', 'dd', 'second', 0, NULL, 1, 0); /*!40000 ALTER TABLE `exercise_type` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_type_alternative +CREATE TABLE IF NOT EXISTS `exercise_type_alternative` ( + `exercise_type_alternative_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `exercise_type_parent_id` int(11) NOT NULL DEFAULT 0, + `exercise_type_child_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`exercise_type_alternative_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_type_alternative: ~2 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_type_alternative` DISABLE KEYS */; +REPLACE INTO `exercise_type_alternative` (`exercise_type_alternative_id`, `exercise_type_parent_id`, `exercise_type_child_id`) VALUES + (1, 37, 33), + (2, 1, 33), + (3, 33, 63); +/*!40000 ALTER TABLE `exercise_type_alternative` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_type_device CREATE TABLE IF NOT EXISTS `exercise_type_device` ( `exercise_type_device_id` int(11) NOT NULL AUTO_INCREMENT, @@ -729,14 +1132,15 @@ CREATE TABLE IF NOT EXISTS `exercise_type_device` ( PRIMARY KEY (`exercise_type_device_id`) USING BTREE, KEY `exercise_type_id` (`exercise_type_id`) USING BTREE, KEY `device_id` (`exercise_device_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; -- Tábla adatainak mentése aitrainer2.exercise_type_device: ~3 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_type_device` DISABLE KEYS */; REPLACE INTO `exercise_type_device` (`exercise_type_device_id`, `exercise_type_id`, `exercise_device_id`) VALUES (1, 37, 1), (2, 38, 1), - (3, 38, 3); + (3, 38, 3), + (4, 123, 1); /*!40000 ALTER TABLE `exercise_type_device` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. exercise_type_image @@ -747,7 +1151,7 @@ CREATE TABLE IF NOT EXISTS `exercise_type_image` ( `type` enum('menu','image','video') DEFAULT 'image', `url` char(200) DEFAULT NULL, PRIMARY KEY (`image_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4; -- Tábla adatainak mentése aitrainer2.exercise_type_image: ~5 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_type_image` DISABLE KEYS */; @@ -756,9 +1160,50 @@ REPLACE INTO `exercise_type_image` (`image_id`, `exercise_type_id`, `name`, `typ (4, 42, 'Menu', 'menu', 'images/3.1.BMI.png'), (5, 37, 'Menu', 'menu', 'images/2.2.1.1.chestpress.png'), (6, 39, 'Menu', 'menu', 'images/2.2.1.3.biceps.png'), - (7, 40, 'menu', 'menu', 'images/2.2.1.4.triceps.png'); + (7, 40, 'menu', 'menu', 'images/2.2.1.4.triceps.png'), + (9, 123, 'Menu', 'image', 'images/aitrainer.png'); /*!40000 ALTER TABLE `exercise_type_image` ENABLE KEYS */; +-- Struktúra mentése tábla aitrainer2. exercise_type_parents +CREATE TABLE IF NOT EXISTS `exercise_type_parents` ( + `exercise_type_parents_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `exercise_tree_id` int(11) NOT NULL DEFAULT 0, + `exercise_type_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`exercise_type_parents_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; + +-- Tábla adatainak mentése aitrainer2.exercise_type_parents: ~26 rows (hozzávetőleg) +/*!40000 ALTER TABLE `exercise_type_parents` DISABLE KEYS */; +REPLACE INTO `exercise_type_parents` (`exercise_type_parents_id`, `exercise_tree_id`, `exercise_type_id`) VALUES + (1, 0, 1), + (2, 0, 2), + (3, 0, 3), + (4, 0, 4), + (5, 0, 5), + (6, 0, 6), + (7, 0, 7), + (8, 0, 8), + (9, 0, 9), + (10, 0, 10), + (11, 0, 11), + (12, 0, 30), + (13, 0, 31), + (14, 0, 32), + (15, 0, 33), + (16, 0, 34), + (17, 0, 35), + (18, 0, 36), + (19, 0, 37), + (20, 0, 39), + (21, 4, 41), + (22, 0, 43), + (23, 4, 38), + (24, 4, 40), + (25, 4, 63), + (26, 5, 42), + (27, 19, 123); +/*!40000 ALTER TABLE `exercise_type_parents` ENABLE KEYS */; + -- Struktúra mentése tábla aitrainer2. exercise_type_translation CREATE TABLE IF NOT EXISTS `exercise_type_translation` ( `translation_id` int(13) NOT NULL AUTO_INCREMENT, @@ -767,7 +1212,7 @@ CREATE TABLE IF NOT EXISTS `exercise_type_translation` ( `name` char(50) DEFAULT NULL, `description` mediumtext DEFAULT NULL, PRIMARY KEY (`translation_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4; -- Tábla adatainak mentése aitrainer2.exercise_type_translation: ~7 rows (hozzávetőleg) /*!40000 ALTER TABLE `exercise_type_translation` DISABLE KEYS */; @@ -778,7 +1223,9 @@ REPLACE INTO `exercise_type_translation` (`translation_id`, `language_code`, `ex (4, 'hu', 43, 'Anyagcsere', ''), (5, 'hu', 37, 'Fekvenyomás', ''), (6, 'hu', 39, 'Bicepsz', ''), - (7, 'hu', 40, 'Tricepsz', 'Tricepsz leírás'); + (7, 'hu', 40, 'Tricepsz', 'Tricepsz leírás'), + (8, 'hu', 123, 'Faltamasz', ''), + (9, 'hu', 41, 'Vállak', ''); /*!40000 ALTER TABLE `exercise_type_translation` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. product @@ -786,40 +1233,40 @@ CREATE TABLE IF NOT EXISTS `product` ( `product_id` int(11) NOT NULL AUTO_INCREMENT, `name` char(50) NOT NULL, `description` mediumtext DEFAULT NULL, - `app_version` CHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci', - `product_set` INT(5) NOT NULL, - `sort` INT(5) NOT NULL, + `app_version` char(50) NOT NULL, + `product_set` int(5) NOT NULL, + `sort` int(5) NOT NULL, `type` enum('subscription','in-app-currency') NOT NULL DEFAULT 'subscription', `valid_from` date DEFAULT NULL, `valid_to` date DEFAULT NULL, - `product_id_ios` CHAR(50) NULL DEFAULT NULL, - `product_id_android` CHAR(50) NULL DEFAULT NULL, - `price_ios` FLOAT NULL DEFAULT NULL, - `price_android` FLOAT NULL DEFAULT NULL, + `product_id_ios` char(50) DEFAULT NULL, + `product_id_android` char(50) DEFAULT NULL, + `price_ios` float DEFAULT NULL, + `price_android` float DEFAULT NULL, PRIMARY KEY (`product_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4; --- Tábla adatainak mentése aitrainer2.product: ~12 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.product: ~18 rows (hozzávetőleg) /*!40000 ALTER TABLE `product` DISABLE KEYS */; -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (1, 'Subscription A', '700 Ft', 'wt', 1, 3, 'subscription', '2020-11-01', NULL, 'p_ios_1', 'p_android_1', 990, 970); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (2, 'Subscription B', '1000 Ft', 'wt', 2, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, 1010, 1005); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (3, 'Subscription C', '1500 Ft', 'wt', 3, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (4, 'Subscription D', '2000 Ft', 'wt', 4, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (5, 'Subscription E', '3000 Ft', 'wt', 5, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (6, 'Subscription F', '5000 Ft', 'wt', 6, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (7, 'Subscription A Yearly', '7000 Ft', 'wt', 1, 1, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (8, 'Subscription B Yearly', '10000', 'wt', 2, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (9, 'Subscription C Yearly', '15000', 'wt', 3, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (10, 'Subscription D Yearly', '20000', 'wt', 4, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (11, 'Subscription E Yearly', '30000', 'wt', 5, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (12, 'Subscription F Yearly', '50000', 'wt', 6, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (13, 'Subscription A Yearly 2', '7700', 'wt', 1, 1, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (14, 'Subscription B Yearly 2', '11000', 'wt', 2, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (15, 'Subscription C Yearly 2', '16000', 'wt', 3, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (16, 'Subscription D Yearly 2', '21000', 'wt', 4, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (17, 'Subscription E Yearly 2', '31000', 'wt', 5, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); -INSERT INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES (18, 'Subscription F Yearly 2', '51000', 'wt', 6, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); - +REPLACE INTO `product` (`product_id`, `name`, `description`, `app_version`, `product_set`, `sort`, `type`, `valid_from`, `valid_to`, `product_id_ios`, `product_id_android`, `price_ios`, `price_android`) VALUES + (1, 'Subscription A', '700 Ft', 'wt', 1, 3, 'subscription', '2020-11-01', NULL, 'p_ios_1', 'p_android_1', 990, 970), + (2, 'Subscription B', '1000 Ft', 'wt', 2, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, 1010, 1005), + (3, 'Subscription C', '1500 Ft', 'wt', 3, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (4, 'Subscription D', '2000 Ft', 'wt', 4, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (5, 'Subscription E', '3000 Ft', 'wt', 5, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (6, 'Subscription F', '5000 Ft', 'wt', 6, 3, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (7, 'Subscription A Yearly', '7000 Ft', 'wt', 1, 1, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (8, 'Subscription B Yearly', '10000', 'wt', 2, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (9, 'Subscription C Yearly', '15000', 'wt', 3, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (10, 'Subscription D Yearly', '20000', 'wt', 4, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (11, 'Subscription E Yearly', '30000', 'wt', 5, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (12, 'Subscription F Yearly', '50000', 'wt', 6, 1, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (13, 'Subscription A Yearly 2', '7700', 'wt', 1, 1, 'subscription', '2020-11-01', NULL, NULL, NULL, NULL, NULL), + (14, 'Subscription B Yearly 2', '11000', 'wt', 2, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (15, 'Subscription C Yearly 2', '16000', 'wt', 3, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (16, 'Subscription D Yearly 2', '21000', 'wt', 4, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (17, 'Subscription E Yearly 2', '31000', 'wt', 5, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL), + (18, 'Subscription F Yearly 2', '51000', 'wt', 6, 2, 'subscription', '2020-11-04', NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `product` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. product_test @@ -831,14 +1278,15 @@ CREATE TABLE IF NOT EXISTS `product_test` ( `purchase_click` tinyint(4) DEFAULT 0, PRIMARY KEY (`product_test_id`) USING BTREE, KEY `customer_id` (`customer_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8mb4; --- Tábla adatainak mentése aitrainer2.product_test: ~3 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.product_test: ~4 rows (hozzávetőleg) /*!40000 ALTER TABLE `product_test` DISABLE KEYS */; REPLACE INTO `product_test` (`product_test_id`, `product_id`, `customer_id`, `date_view`, `purchase_click`) VALUES (4, 2, 62, '2020-10-01 12:00:00', 0), (5, 2, 62, '2020-11-01 12:00:00', 0), - (8, 1, 1, '2020-11-01 07:07:02', 0); + (8, 1, 1, '2020-11-01 07:07:02', 0), + (48, 1, 90, '2021-02-03 23:19:20', 0); /*!40000 ALTER TABLE `product_test` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. property @@ -847,15 +1295,18 @@ CREATE TABLE IF NOT EXISTS `property` ( `property_name` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, `property_unit` char(50) COLLATE utf8_hungarian_ci DEFAULT NULL, PRIMARY KEY (`property_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; --- Tábla adatainak mentése aitrainer2.property: ~4 rows (hozzávetőleg) +-- Tábla adatainak mentése aitrainer2.property: ~6 rows (hozzávetőleg) /*!40000 ALTER TABLE `property` DISABLE KEYS */; REPLACE INTO `property` (`property_id`, `property_name`, `property_unit`) VALUES (1, 'Weight', 'kg'), (2, 'Height', 'cm'), (3, 'Chest', 'cm'), - (4, 'Biceps', 'cm'); + (4, 'Biceps', 'cm'), + (5, 'Ectomorph', NULL), + (6, 'Mezoporph', NULL), + (7, 'Endomorph', NULL); /*!40000 ALTER TABLE `property` ENABLE KEYS */; -- Struktúra mentése tábla aitrainer2. property_translation @@ -883,7 +1334,7 @@ CREATE TABLE IF NOT EXISTS `purchase` ( `currency` char(3) DEFAULT NULL, PRIMARY KEY (`purchase_id`) USING BTREE, KEY `customer_id` (`customer_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4; -- Tábla adatainak mentése aitrainer2.purchase: ~5 rows (hozzávetőleg) /*!40000 ALTER TABLE `purchase` DISABLE KEYS */; @@ -895,156 +1346,26 @@ REPLACE INTO `purchase` (`purchase_id`, `customer_id`, `product_id`, `date_add`, (7, 1, 2, '2020-11-05 12:00:00', 2000, 'HUF'); /*!40000 ALTER TABLE `purchase` ENABLE KEYS */; -CREATE TABLE `exercise_result` ( - `exercise_result_id` INT(11) NOT NULL AUTO_INCREMENT, - `customer_id` INT(11) NOT NULL DEFAULT '0', - `exercise_id` INT(11) NULL DEFAULT '0', - `exercise_plan_id` INT(11) NULL DEFAULT '0', - `result_type` CHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8_hungarian_ci', - `value` DOUBLE NOT NULL, - `date_from` DATETIME NULL DEFAULT NULL, - `date_to` DATETIME NULL DEFAULT NULL, - PRIMARY KEY (`exercise_result_id`) USING BTREE -) -COLLATE='utf8_hungarian_ci' -ENGINE=InnoDB -; - -INSERT INTO `exercise_result` (`exercise_result_id`, `customer_id`, `exercise_id`, `exercise_plan_id`, `result_type`, `value`, `date_from`, `date_to`) VALUES (1, 90, 1, 0, 'calorie', 134, '2020-12-12 10:56:45', NULL); -INSERT INTO `exercise_result` (`exercise_result_id`, `customer_id`, `exercise_id`, `exercise_plan_id`, `result_type`, `value`, `date_from`, `date_to`) VALUES (2, 90, 2, 0, 'fatburn', 31, '2020-12-12 10:57:00', NULL); -INSERT INTO `exercise_result` (`exercise_result_id`, `customer_id`, `exercise_id`, `exercise_plan_id`, `result_type`, `value`, `date_from`, `date_to`) VALUES (3, 90, 1, 0, 'development', 11.1, '2020-12-12 10:57:28', NULL); -INSERT INTO `exercise_result` (`exercise_result_id`, `customer_id`, `exercise_id`, `exercise_plan_id`, `result_type`, `value`, `date_from`, `date_to`) VALUES (4, 90, 1, 0, 'bpm_min', 113, '2020-12-12 10:57:52', NULL); - -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 -; - -INSERT INTO `exercise_ability` (`exercise_ability_id`, `name`, `description`) VALUES (1, '1RM', 'One Rep Max'); -INSERT INTO `exercise_ability` (`exercise_ability_id`, `name`, `description`) VALUES (2, 'Endurance', NULL); -INSERT INTO `exercise_ability` (`exercise_ability_id`, `name`, `description`) VALUES (3, 'Cardio', NULL); - -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` TEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci', - `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_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', - `sort` TINYINT(2) NULL DEFAULT NULL, - 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 -; - - -CREATE TABLE `evaluation` ( - `evaluation_id` INT(11) NOT NULL AUTO_INCREMENT, - `exercise_type_id` INT(11) NOT NULL, - `name` CHAR(100) NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci', - `unit` CHAR(50) NULL DEFAULT NULL COMMENT 'repeats, second, etc' COLLATE 'utf8_hungarian_ci', - PRIMARY KEY (`evaluation_id`) USING BTREE -) -COLLATE='utf8_hungarian_ci' -ENGINE=InnoDB -; - -INSERT INTO `evaluation` (`evaluation_id`, `exercise_type_id`, `name`, `unit`) VALUES (1, 33, 'PushUps', 'repeats'); -INSERT INTO `evaluation` (`evaluation_id`, `exercise_type_id`, `name`, `unit`) VALUES (2, 35, 'Squats', 'repeats'); - -CREATE TABLE `evaluation_attribute` ( - `evaluation_attr_id` INT(11) NOT NULL AUTO_INCREMENT, - `evaluation_id` INT(11) NOT NULL, - `name` CHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8_hungarian_ci', - `age_min` INT(3) NOT NULL DEFAULT '0', - `age_max` INT(3) NOT NULL DEFAULT '0', - `value_min` DOUBLE NOT NULL DEFAULT '0', - `value_max` DOUBLE NOT NULL DEFAULT '0', - `sex` ENUM('m','w') NOT NULL DEFAULT 'm' COLLATE 'utf8_hungarian_ci', - `evaluation_text` CHAR(50) NOT NULL COLLATE 'utf8_hungarian_ci', - `suggestion` TEXT NULL DEFAULT NULL COLLATE 'utf8_hungarian_ci', - PRIMARY KEY (`evaluation_attr_id`) USING BTREE, - INDEX `evalutation_id` (`evaluation_id`) USING BTREE -) -COLLATE='utf8_hungarian_ci' -ENGINE=InnoDB -; - -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (1, 1, 'Fekvőtámasz_ffi_17-19_very_poor', 17, 19, 0, 4, 'm', 'very_poor', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (2, 1, 'Fekvőtámasz_ffi_17-19_fair', 17, 19, 20, 34, 'm', 'fair', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (3, 1, 'Fekvőtámasz_ffi_17-19_avg', 17, 19, 19, 34, 'm', 'average', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (4, 1, 'Fekvőtámasz_ffi_17-19_below_avg', 17, 19, 10, 18, 'm', 'below_average', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (5, 1, 'Fekvőtámasz_ffi_17-19_poor', 17, 19, 4, 10, 'm', 'poor', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (6, 1, 'Fekvőtámasz_ffi_17-19_above_avg', 17, 19, 19, 34, 'm', 'average', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (7, 1, 'Fekvőtámasz_ffi_17-19_good', 17, 19, 47, 56, 'm', 'good', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (8, 1, 'Fekvőtámasz_ffi_17-19_excellent', 17, 19, 56, 99, 'm', 'excellent', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (9, 1, 'Fekvőtámasz_ffi_17-19_elite', 17, 19, 100, 100000, 'm', 'excellent', NULL); -INSERT INTO `evaluation_attribute` (`evaluation_attr_id`, `evaluation_id`, `name`, `age_min`, `age_max`, `value_min`, `value_max`, `sex`, `evaluation_text`, `suggestion`) VALUES (10, 1, 'Fekvőtámasz_ffi_20-29_very_poor', 20, 29, 0, 4, 'm', 'very_poor', NULL); - -CREATE TABLE `customer_activity` ( - `activity_id` INT(11) NOT NULL AUTO_INCREMENT, - `customer_id` INT(14) NOT NULL DEFAULT '0', - `type` CHAR(50) NOT NULL COLLATE 'utf8_hungarian_ci', - `date_add` DATETIME NOT NULL, - `skipped` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`activity_id`) USING BTREE -) -COLLATE='utf8_hungarian_ci' -ENGINE=InnoDB -; +-- Struktúra mentése tábla aitrainer2. tracking +CREATE TABLE IF NOT EXISTS `tracking` ( + `tracking_id` int(20) NOT NULL AUTO_INCREMENT, + `customer_id` int(20) NOT NULL DEFAULT 0, + `date_add` datetime NOT NULL, + `event` char(100) COLLATE utf8_hungarian_ci DEFAULT NULL, + `event_value` text COLLATE utf8_hungarian_ci DEFAULT NULL, + `area` char(100) COLLATE utf8_hungarian_ci DEFAULT NULL, + `platform` char(20) COLLATE utf8_hungarian_ci DEFAULT NULL, + `version` char(20) COLLATE utf8_hungarian_ci DEFAULT NULL, + PRIMARY KEY (`tracking_id`) USING BTREE, + KEY `customer_id` (`customer_id`), + KEY `event` (`event`) +) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci; +-- Tábla adatainak mentése aitrainer2.tracking: ~0 rows (hozzávetőleg) +/*!40000 ALTER TABLE `tracking` DISABLE KEYS */; +/*!40000 ALTER TABLE `tracking` ENABLE KEYS */; /*!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) */; +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */; diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 35c9b0f..1577c2a 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml logging.file=logs # if the database structure has been changed, increment this version number -application.version=1.0.29 +application.version=1.0.30 jwt.secret=aitrainer \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 6e308b0..062f08b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml logging.file=logs # if the database structure has been changed, increment this version number -application.version=1.0.29 +application.version=1.0.30 jwt.secret=aitrainer \ No newline at end of file