From ccf208eebbb8e70b6c1980686917a2b630a6db6e Mon Sep 17 00:00:00 2001 From: unknown <13521043@std.stei.itb.ac.id> Date: Thu, 26 Oct 2023 20:16:29 +0700 Subject: [PATCH] update database: add check for rating user --- db/gym_tracker.sql | 230 +++++++++++++++------------------------------ 1 file changed, 76 insertions(+), 154 deletions(-) diff --git a/db/gym_tracker.sql b/db/gym_tracker.sql index 754cc9a..82cded5 100644 --- a/db/gym_tracker.sql +++ b/db/gym_tracker.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Host: db:3306 --- Generation Time: Oct 18, 2023 at 06:26 AM +-- Generation Time: Oct 26, 2023 at 01:08 PM -- Server version: 8.1.0 -- PHP Version: 8.2.8 @@ -21,14 +21,6 @@ SET time_zone = "+00:00"; -- Database: `gym_tracker` -- -DELIMITER $$ --- --- Procedures --- -$$ - -DELIMITER ; - -- -------------------------------------------------------- -- @@ -50,30 +42,6 @@ INSERT INTO `city` (`city_id`, `name`) VALUES -- -------------------------------------------------------- --- --- Table structure for table `comments` --- - -CREATE TABLE `comments` ( - `gym_id` int NOT NULL, - `username` varchar(50) NOT NULL, - `comment_id` int NOT NULL, - `comment` varchar(255) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- -------------------------------------------------------- - --- --- Table structure for table `favorites` --- - -CREATE TABLE `favorites` ( - `username` varchar(50) NOT NULL, - `gym_id` int NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- -------------------------------------------------------- - -- -- Table structure for table `gym` -- @@ -94,8 +62,7 @@ CREATE TABLE `gym` ( -- INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES -(37, 'FitHub', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 1, 1, 1, 0, 133029), -(38, 'TotalGym Fitness', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 1, 1, 1, 0, 141358), +(37, 'FitHub', '', 1, 1, 1, 0, 133029), (39, 'Core Power Gym', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 3, 1, 1, 0, 55666), (40, 'Gymfinity', 'Get results and have fun through our group fitness classes and community events.', 3, 1, 1, 0, 201145), (41, 'PowerSculpt', 'Get stronger, fitter, and healthier with our structured fitness programs.', 3, 1, 1, 0, 460256), @@ -495,10 +462,10 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (435, 'FlexXtreme Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 3, 1, 1, 0, 372753), (436, 'FlexXpress', 'Your source for health and fitness, offering classes and equipment for every need.', 3, 1, 1, 0, 17137), (437, 'Gainz', 'Your source for health and fitness, offering classes and equipment for every need.', 1, 1, 1, 0, 158925), -(438, 'IronHearts Gym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 3, 1, 1, 0, 349084); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(438, 'IronHearts Gym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 3, 1, 1, 0, 349084), (439, 'FlexXtreme Gym', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 3, 1, 1, 0, 70912), -(440, 'ShapeMaster', 'We specialize in strength and conditioning for competitive sports and athletics.', 3, 1, 1, 0, 118070), +(440, 'ShapeMaster', 'We specialize in strength and conditioning for competitive sports and athletics.', 3, 1, 1, 0, 118070); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (441, 'GymVortex', 'Achieve your fitness goals with our well-equipped gym and professional trainers.', 1, 1, 1, 0, 78877), (442, 'PowerSculpt', 'Improve your athletic performance with our sports-specific training programs.', 1, 1, 1, 0, 133120), (443, 'IronWorks Fitness', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 306032), @@ -893,11 +860,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (832, 'Pumping Iron', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 74830), (833, 'FitnessUtopia', 'Your destination for bodybuilding, powerlifting, and strongman training.', 1, 1, 1, 0, 211137), (834, 'Gymfinity', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 3, 1, 1, 0, 3421), -(835, 'PowerFlow Gym', 'A dedicated space for high-intensity workouts and functional fitness training.', 3, 1, 1, 0, 16395); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(835, 'PowerFlow Gym', 'A dedicated space for high-intensity workouts and functional fitness training.', 3, 1, 1, 0, 16395), (836, 'Tevvez', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 335634), (837, 'FitFusion Gym', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 1, 1, 1, 0, 221074), -(838, 'BodyTech Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 355743), +(838, 'BodyTech Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 355743); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (839, 'EliteShape Gym', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 188539), (840, 'IronGrip Gym', 'Train with a purpose and develop the skills you need to reach your goals.', 1, 1, 1, 0, 104232), (841, 'BodyRockers', 'Discover the benefits of aquatic fitness, swimming, and water aerobics in our gym\'s pool.', 3, 1, 1, 0, 197361), @@ -1293,11 +1260,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (1231, 'VitalLife Fitness', 'Join a tight-knit fitness community that supports each other\'s growth.', 1, 1, 1, 0, 76807), (1232, 'FitnessUtopia', 'Join a tight-knit fitness community that supports each other\'s growth.', 3, 1, 1, 0, 125470), (1233, 'MuscleMania', 'Your source for health and fitness, offering classes and equipment for every need.', 1, 1, 1, 0, 57038), -(1234, 'Vitality Fitness', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 3, 1, 1, 0, 402591); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(1234, 'Vitality Fitness', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 3, 1, 1, 0, 402591), (1235, 'FitnessVibe', 'Enhance your health and well-being through fitness, nutrition, and lifestyle guidance.', 3, 1, 1, 0, 329322), (1236, 'FitHub', 'Improve your athletic performance with our sports-specific training programs.', 3, 1, 1, 0, 350348), -(1237, 'EliteShape Gym', 'Get results and have fun through our group fitness classes and community events.', 1, 1, 1, 0, 273834), +(1237, 'EliteShape Gym', 'Get results and have fun through our group fitness classes and community events.', 1, 1, 1, 0, 273834); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (1238, 'ToneUp Gym', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 92399), (1239, 'BodySculpt Gym', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 3, 1, 1, 0, 151371), (1240, 'FitFusion Center', 'Your destination for bodybuilding, powerlifting, and strongman training.', 1, 1, 1, 0, 196094), @@ -1687,11 +1654,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (1624, 'Peak Shape Gym', 'We offer nutrition counseling to complement your exercise routine and improve your overall health.', 3, 1, 1, 0, 23267), (1625, 'MuscleMax Fitness', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 3, 1, 1, 0, 378475), (1626, 'BodyTech Gym', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 1, 1, 1, 0, 141621), -(1627, 'FlexXpress', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 3, 1, 1, 0, 133718); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(1627, 'FlexXpress', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 3, 1, 1, 0, 133718), (1628, 'Body Sculptor', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 268874), (1629, 'CoreFitnessX', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 363784), -(1630, 'Fitness Focus', 'Train like a pro with top-notch equipment and expert coaching.', 1, 1, 1, 0, 149607), +(1630, 'Fitness Focus', 'Train like a pro with top-notch equipment and expert coaching.', 1, 1, 1, 0, 149607); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (1631, 'BodyRevolution', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 3, 1, 1, 0, 376870), (1632, 'FlexXpress', 'We specialize in athletic performance training for individuals and teams.', 3, 1, 1, 0, 149646), (1633, 'Tevvez', 'Specialized training for athletes aiming to reach peak performance and achieve their goals.', 1, 1, 1, 0, 428030), @@ -2086,11 +2053,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (2022, 'Fitness Oasis', 'We provide a supportive and motivating environment where you can achieve your strength and conditioning objectives.', 1, 1, 1, 0, 336636), (2023, 'FitnessVibe', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 68035), (2024, 'Pumping Iron', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 61340), -(2025, 'ActiveLife Gym', 'Our gym is a place where you can push yourself, meet your potential, and transform.', 3, 1, 1, 0, 47207); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(2025, 'ActiveLife Gym', 'Our gym is a place where you can push yourself, meet your potential, and transform.', 3, 1, 1, 0, 47207), (2026, 'FitForm Fitness', 'Get results and have fun through our group fitness classes and community events.', 1, 1, 1, 0, 308708), (2027, 'CoreBody Gym', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 3, 1, 1, 0, 107724), -(2028, 'VitalityHealth', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 136031), +(2028, 'VitalityHealth', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 136031); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (2029, 'CorePower Studio', 'We\'re dedicated to helping you create lasting changes in your health and fitness.', 1, 1, 1, 0, 457415), (2030, 'BodySymphony', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 3, 1, 1, 0, 465320), (2031, 'BodySculpt Haven', 'Train like a pro with top-notch equipment and expert coaching.', 1, 1, 1, 0, 176437), @@ -2482,11 +2449,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (2417, 'Reps & Results', 'Our gym is a space for you to find your passion for fitness and a healthier lifestyle.', 3, 1, 1, 0, 303819), (2418, 'FlexXtreme Gym', 'We offer nutrition counseling to complement your exercise routine and improve your overall health.', 1, 1, 1, 0, 168244), (2419, 'LiftOff Gym', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 3, 1, 1, 0, 131711), -(2420, 'IronZen Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 374445); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(2420, 'IronZen Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 374445), (2421, 'EliteShape Gym', 'Train with a group of like-minded individuals who share your fitness aspirations.', 3, 1, 1, 0, 308911), (2422, 'FitHub', 'Enhance your health and well-being through fitness, nutrition, and lifestyle guidance.', 1, 1, 1, 0, 224183), -(2423, 'StaminaStation', 'A gym that offers a mix of traditional exercises and innovative training methods.', 3, 1, 1, 0, 110565), +(2423, 'StaminaStation', 'A gym that offers a mix of traditional exercises and innovative training methods.', 3, 1, 1, 0, 110565); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (2424, 'ShapeMaster', 'Improve your athletic performance with our sports-specific training programs.', 1, 1, 1, 0, 329957), (2425, 'FitLife Center', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 406595), (2426, 'Peak Performance Gym', 'Improve your athletic performance with our sports-specific training programs.', 1, 1, 1, 0, 168178), @@ -2881,11 +2848,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (2815, 'GymDynamo', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 1, 1, 1, 0, 416475), (2816, 'Lift Lab', 'Improve your physical and mental health through our wellness programs.', 3, 1, 1, 0, 97941), (2817, 'IronGrip Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 310617), -(2818, 'Energy Emporium', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 3, 1, 1, 0, 38858); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(2818, 'Energy Emporium', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 3, 1, 1, 0, 38858), (2819, 'Muscle Factory', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 309188), (2820, 'Wellness Center', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 324584), -(2821, 'Peak Shape Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 255492), +(2821, 'Peak Shape Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 255492); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (2822, 'FlexXtreme Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 331113), (2823, 'FitnessJunction', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 99941), (2824, 'FitnessUtopia', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 72355), @@ -3282,11 +3249,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (3215, 'FlexFit Gym', 'Improve your balance, flexibility, and core strength through our Pilates classes.', 3, 1, 1, 0, 332170), (3216, 'StrengthSculpt', 'Improve your balance, flexibility, and core strength through our Pilates classes.', 3, 1, 1, 0, 229468), (3217, 'VitalLife Fitness', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 3, 1, 1, 0, 494285), -(3218, 'VitalityHealth', 'A boutique gym with a focus on individualized training plans and a supportive community.', 1, 1, 1, 0, 389577); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(3218, 'VitalityHealth', 'A boutique gym with a focus on individualized training plans and a supportive community.', 1, 1, 1, 0, 389577), (3219, 'GymVortex', 'Get results and have fun through our group fitness classes and community events.', 3, 1, 1, 0, 499041), (3220, 'Strength Forge', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 3, 1, 1, 0, 401547), -(3221, 'Muscle Haven', 'We\'re dedicated to helping you create lasting changes in your health and fitness.', 3, 1, 1, 0, 461465), +(3221, 'Muscle Haven', 'We\'re dedicated to helping you create lasting changes in your health and fitness.', 3, 1, 1, 0, 461465); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (3222, 'HealthElite Gym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 1, 1, 1, 0, 170031), (3223, 'Peak Performance Gym', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 406950), (3224, 'BodyBlitz', 'We specialize in athletic performance training for individuals and teams.', 3, 1, 1, 0, 293381), @@ -3680,11 +3647,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (3612, 'Gymfinity', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 1, 1, 1, 0, 421759), (3613, 'FitnessVibe', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 1, 1, 1, 0, 108113), (3614, 'CoreFitnessX', 'Train like a pro with top-notch equipment and expert coaching.', 3, 1, 1, 0, 73146), -(3615, 'ActiveLife Gym', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 3, 1, 1, 0, 3852); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(3615, 'ActiveLife Gym', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 3, 1, 1, 0, 3852), (3616, 'Energy Emporium', 'Your source for health and fitness, offering classes and equipment for every need.', 3, 1, 1, 0, 397997), (3617, 'Energy Emporium', 'Elevate your fitness journey with our group fitness classes and community support.', 3, 1, 1, 0, 7109), -(3618, 'Sculptor\'s Den', 'Group fitness classes for all levels, from beginners to advanced athletes.', 1, 1, 1, 0, 144149), +(3618, 'Sculptor\'s Den', 'Group fitness classes for all levels, from beginners to advanced athletes.', 1, 1, 1, 0, 144149); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (3619, 'Strength Forge', 'Our gym is a place where you can push yourself, meet your potential, and transform.', 1, 1, 1, 0, 481511), (3620, 'FlexXpress', 'We offer nutrition counseling to complement your exercise routine and improve your overall health.', 1, 1, 1, 0, 228533), (3621, 'EnergyEmporium', 'Transform your body and mind through our comprehensive wellness programs.', 3, 1, 1, 0, 438031), @@ -4073,12 +4040,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (4004, 'VitalLife Fitness', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 3, 1, 1, 0, 433899), (4005, 'FlexInstitute', 'A gym that offers a mix of traditional exercises and innovative training methods.', 3, 1, 1, 0, 473103), (4006, 'BodyRevolution', 'We\'re dedicated to helping you create lasting changes in your health and fitness.', 1, 1, 1, 0, 195584), -(4007, 'Peak Performance Gym', 'Join us for innovative workouts that push your boundaries and challenge your limits.', 3, 1, 1, 0, 115989); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(4007, 'Peak Performance Gym', 'Join us for innovative workouts that push your boundaries and challenge your limits.', 3, 1, 1, 0, 115989), (4008, 'Zenith Fitness', 'Our gym is a space for you to find your passion for fitness and a healthier lifestyle.', 3, 1, 1, 0, 22398), (4009, 'Vitality Vibe', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 384843), (4010, 'PowerHouse Gym', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 1, 1, 1, 0, 34971), -(4011, 'Sculpted Body', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 7864), +(4011, 'Sculpted Body', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 7864); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (4012, 'MuscleMania', 'Our gym is a space for you to find your passion for fitness and a healthier lifestyle.', 1, 1, 1, 0, 279843), (4013, 'FitVortex', 'A wellness center that combines fitness, nutrition, and relaxation in a holistic approach.', 1, 1, 1, 0, 102294), (4014, 'StaminaVista', 'A comprehensive gym for body, mind, and spirit, with yoga, meditation, and relaxation.', 3, 1, 1, 0, 413319), @@ -4467,12 +4434,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (4397, 'StrengthSphere', 'High-energy and dynamic workouts designed to challenge and inspire you.', 1, 1, 1, 0, 316517), (4398, 'Vitality Fitness', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 104589), (4399, 'IronPulse Gym', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 404027), -(4400, 'FitLife Center', 'Join us for indoor and outdoor group fitness classes, yoga, and meditation sessions.', 1, 1, 1, 0, 73371); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(4400, 'FitLife Center', 'Join us for indoor and outdoor group fitness classes, yoga, and meditation sessions.', 1, 1, 1, 0, 73371), (4401, 'Sculpted Body', 'Discover the transformative power of mindfulness and yoga in our gym.', 1, 1, 1, 0, 111514), (4402, 'EliteShape Gym', 'The perfect place to build muscle, increase endurance, and improve your overall fitness.', 1, 1, 1, 0, 50189), (4403, 'GymVortex', 'Join our gym for a comprehensive fitness experience that includes strength training, cardio, and group classes.', 1, 1, 1, 0, 144406), -(4404, 'MuscleMania', 'A gym that offers 24/7 access, so you can work out on your schedule.', 1, 1, 1, 0, 186811), +(4404, 'MuscleMania', 'A gym that offers 24/7 access, so you can work out on your schedule.', 1, 1, 1, 0, 186811); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (4405, 'IronZen Gym', 'Train with certified trainers who are passionate about helping you succeed.', 1, 1, 1, 0, 353030), (4406, 'BodySymphony', 'Get results and have fun through our group fitness classes and community events.', 1, 1, 1, 0, 221786), (4407, 'HealthElite Gym', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 3, 1, 1, 0, 148919), @@ -4862,12 +4829,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (4791, 'PeakFitnessX', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 182160), (4792, 'Muscle Factory', 'High-energy and dynamic workouts designed to challenge and inspire you.', 1, 1, 1, 0, 406978), (4793, 'Total Body Fitness', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 1, 1, 1, 0, 218398), -(4794, 'VitalLife Fitness', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 3, 1, 1, 0, 70725); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(4794, 'VitalLife Fitness', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 3, 1, 1, 0, 70725), (4795, 'TotalFit Studio', 'Achieve your fitness goals with our well-equipped gym and professional trainers.', 3, 1, 1, 0, 298439), (4796, 'FitForm Fitness', 'We\'re dedicated to helping seniors maintain their health and mobility through tailored programs.', 3, 1, 1, 0, 284876), (4797, 'FitnessUtopia', 'Your source for health and fitness, offering classes and equipment for every need.', 3, 1, 1, 0, 122727), -(4798, 'BodyPump Studio', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 3, 1, 1, 0, 308744), +(4798, 'BodyPump Studio', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 3, 1, 1, 0, 308744); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (4799, 'Vitality Vibe', 'Our gym is a place where you can push yourself, meet your potential, and transform.', 1, 1, 1, 0, 199350), (4800, 'BodySymphony', 'A gym that embraces diversity and promotes inclusion in all aspects of our services.', 1, 1, 1, 0, 488179), (4801, 'IronZen Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 399992), @@ -5257,12 +5224,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (5185, 'Peak Shape Gym', 'Train with a group of like-minded individuals who share your fitness aspirations.', 3, 1, 1, 0, 387322), (5186, 'Fitness Oasis', 'Improve your athletic performance with our sports-specific training programs.', 3, 1, 1, 0, 180313), (5187, 'Energy Express', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 9987), -(5188, 'EliteShape Gym', 'A dedicated space for high-intensity workouts and functional fitness training.', 1, 1, 1, 0, 292239); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(5188, 'EliteShape Gym', 'A dedicated space for high-intensity workouts and functional fitness training.', 1, 1, 1, 0, 292239), (5189, 'GymHeroes', 'Elevate your fitness journey with our group fitness classes and community support.', 1, 1, 1, 0, 334321), (5190, 'Elite Edge Fitness', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 71968), (5191, 'Wellness Center', 'Experience fitness as a lifestyle, not just a workout, at our facility.', 3, 1, 1, 0, 198209), -(5192, 'IronWorks Fitness', 'Join a tight-knit fitness community that supports each other\'s growth.', 3, 1, 1, 0, 433821), +(5192, 'IronWorks Fitness', 'Join a tight-knit fitness community that supports each other\'s growth.', 3, 1, 1, 0, 433821); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (5193, 'Elite Edge Fitness', 'Train with a purpose and develop the skills you need to reach your goals.', 3, 1, 1, 0, 373910), (5194, 'StaminaStrong', 'Train like a pro with top-notch equipment and expert coaching.', 3, 1, 1, 0, 36198), (5195, 'FitHub', 'A comprehensive gym for body, mind, and spirit, with yoga, meditation, and relaxation.', 1, 1, 1, 0, 266991), @@ -5654,11 +5621,11 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (5581, 'Sculpted Body', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 1, 1, 1, 0, 207422), (5582, 'IronGrip Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 1, 1, 1, 0, 213537), (5583, 'BodyTech Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 1, 1, 1, 0, 359465), -(5584, 'CoreBlitz Fitness', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 65197); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(5584, 'CoreBlitz Fitness', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 65197), (5585, 'Sculpted Body', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 3, 1, 1, 0, 108721), (5586, 'PowerFlow Gym', 'Get in shape and stay healthy with a wide variety of cardiovascular and weight training equipment.', 3, 1, 1, 0, 395888), -(5587, 'ActiveLife Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 415477), +(5587, 'ActiveLife Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 1, 1, 1, 0, 415477); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (5588, 'Reps & Repose', 'Join our gym for a comprehensive fitness experience that includes strength training, cardio, and group classes.', 3, 1, 1, 0, 476670), (5589, 'BodyBlitz', 'Discover the transformative power of mindfulness and yoga in our gym.', 1, 1, 1, 0, 117551), (5590, 'TotalFit Studio', 'Join a tight-knit fitness community that supports each other\'s growth.', 3, 1, 1, 0, 92202), @@ -6049,12 +6016,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (5975, 'FlexFit Gym', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 219470), (5976, 'GymRush', 'Transform your body and mind through our comprehensive wellness programs.', 1, 1, 1, 0, 496365), (5977, 'Gainz', 'A wellness center that combines fitness, nutrition, and relaxation in a holistic approach.', 1, 1, 1, 0, 198893), -(5978, 'CoreBody Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 313838); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(5978, 'CoreBody Gym', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 313838), (5979, 'Lift Lab', 'A holistic approach to health and wellness, emphasizing lifestyle changes and self-care.', 3, 1, 1, 0, 258765), (5980, 'BodyBlitz', 'Tailored fitness programs designed for weight loss and body transformation.', 3, 1, 1, 0, 430040), (5981, 'CoreFitnessX', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 263648), -(5982, 'Workout World', 'A focus on health and well-being through fitness, nutrition, and relaxation.', 1, 1, 1, 0, 423193), +(5982, 'Workout World', 'A focus on health and well-being through fitness, nutrition, and relaxation.', 1, 1, 1, 0, 423193); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (5983, 'HealthElite Gym', 'A family-friendly gym providing activities for all ages and fitness interests.', 1, 1, 1, 0, 73922), (5984, 'GymHeroes', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 3, 1, 1, 0, 284739), (5985, 'PowerSculpt', 'Train with a purpose and develop the skills you need to reach your goals.', 1, 1, 1, 0, 323254), @@ -6445,12 +6412,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (6370, 'CoreBlitz Fitness', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 3, 1, 1, 0, 140917), (6371, 'IronPulse Gym', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 3, 1, 1, 0, 262666), (6372, 'VitalLife Fitness', 'Our gym is a place where you can push yourself, meet your potential, and transform.', 1, 1, 1, 0, 478477), -(6373, 'TotalGym Fitness', 'Train like a pro with top-notch equipment and expert coaching.', 3, 1, 1, 0, 473592); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(6373, 'TotalGym Fitness', 'Train like a pro with top-notch equipment and expert coaching.', 3, 1, 1, 0, 473592), (6374, 'Reps & Results', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 1, 1, 1, 0, 201190), (6375, 'FlexInstitute', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 1, 1, 1, 0, 214761), (6376, 'IronBody Gym', 'Enhance your health and well-being through fitness, nutrition, and lifestyle guidance.', 1, 1, 1, 0, 378051), -(6377, 'LumberGym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 1, 1, 1, 0, 300251), +(6377, 'LumberGym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 1, 1, 1, 0, 300251); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (6378, 'Gymfinity', 'A family-friendly gym providing activities for all ages and fitness interests.', 3, 1, 1, 0, 56936), (6379, 'PowerFlow Gym', 'Train with a purpose and develop the skills you need to reach your goals.', 1, 1, 1, 0, 76339), (6380, 'IronBody Gym', 'Group fitness classes for all levels, from beginners to advanced athletes.', 3, 1, 1, 0, 239989), @@ -6842,12 +6809,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (6766, 'GymRush', 'A gym that offers 24/7 access, so you can work out on your schedule.', 1, 1, 1, 0, 451925), (6767, 'FitZen Center', 'We offer nutrition counseling to complement your exercise routine and improve your overall health.', 3, 1, 1, 0, 308421), (6768, 'BodyBlitz', 'Achieve a balanced lifestyle with our integrated approach to fitness and well-being.', 1, 1, 1, 0, 185772), -(6769, 'FitVista', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 3, 1, 1, 0, 91602); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(6769, 'FitVista', 'Join us for challenging HIIT workouts, personal training, and nutrition guidance.', 3, 1, 1, 0, 91602), (6770, 'Muscle Haven', 'We provide physical therapy services to aid in injury recovery and prevention.', 3, 1, 1, 0, 453251), (6771, 'FlexXpress', 'Train with a group of like-minded individuals who share your fitness aspirations.', 3, 1, 1, 0, 215092), (6772, 'Muscle Factory', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 136639), -(6773, 'PowerFlow Gym', 'Specialized training for athletes aiming to reach peak performance and achieve their goals.', 1, 1, 1, 0, 491477), +(6773, 'PowerFlow Gym', 'Specialized training for athletes aiming to reach peak performance and achieve their goals.', 1, 1, 1, 0, 491477); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (6774, 'EliteShape Gym', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 1, 1, 1, 0, 104622), (6775, 'IronBody Gym', 'Your source for health and fitness, offering classes and equipment for every need.', 3, 1, 1, 0, 97401), (6776, 'Vitality Fitness', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 38341), @@ -7240,12 +7207,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (7163, 'CoreBody Gym', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 345137), (7164, 'LiftOff Gym', 'Your destination for bodybuilding, powerlifting, and strongman training.', 1, 1, 1, 0, 295822), (7165, 'MuscleMax Fitness', 'Improve your physical and mental health through our wellness programs.', 3, 1, 1, 0, 334997), -(7166, 'Reps & Repose', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 320976); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(7166, 'Reps & Repose', 'Our gym offers specialized classes for dance, pilates, and flexibility.', 1, 1, 1, 0, 320976), (7167, 'TotalFit Studio', 'A boutique gym with a focus on individualized training plans and a supportive community.', 1, 1, 1, 0, 441621), (7168, 'Reps & Repose', 'Join us for innovative workouts that push your boundaries and challenge your limits.', 1, 1, 1, 0, 184376), (7169, 'MuscleMax Fitness', 'Enhance your health and well-being through fitness, nutrition, and lifestyle guidance.', 3, 1, 1, 0, 270910), -(7170, 'ActiveLife Gym', 'Your destination for bodybuilding, powerlifting, and strongman training.', 1, 1, 1, 0, 165660), +(7170, 'ActiveLife Gym', 'Your destination for bodybuilding, powerlifting, and strongman training.', 1, 1, 1, 0, 165660); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (7171, 'PeakForm Fitness', 'Train with certified trainers who are passionate about helping you succeed.', 1, 1, 1, 0, 222472), (7172, 'FlexXtreme Gym', 'A gym that offers a mix of traditional exercises and innovative training methods.', 3, 1, 1, 0, 78042), (7173, 'VitalityHealth', 'Get in shape and stay healthy with a wide variety of cardiovascular and weight training equipment.', 1, 1, 1, 0, 200863), @@ -7639,12 +7606,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (7561, 'FitnessUtopia', 'Get results and have fun through our group fitness classes and community events.', 1, 1, 1, 0, 183456), (7562, 'PeakFitnessX', 'A family-friendly gym providing activities for all ages and fitness interests.', 3, 1, 1, 0, 210154), (7563, 'StrengthSculpt', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 1, 1, 1, 0, 337858), -(7564, 'Lift Lab', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 200984); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(7564, 'Lift Lab', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 200984), (7565, 'GymVortex', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 3, 1, 1, 0, 328804), (7566, 'PowerFlow Gym', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 100201), (7567, 'ActiveLife Gym', 'Transform your body and mind through our comprehensive wellness programs.', 3, 1, 1, 0, 391689), -(7568, 'Reps & Repose', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 1, 1, 1, 0, 438742), +(7568, 'Reps & Repose', 'We offer martial arts training, self-defense classes, and discipline for the mind and body.', 1, 1, 1, 0, 438742); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (7569, 'GymVortex', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 3, 1, 1, 0, 76222), (7570, 'FitVortex', 'Train with a purpose and develop the skills you need to reach your goals.', 1, 1, 1, 0, 409536), (7571, 'TotalGym Fitness', 'Discover the transformative power of mindfulness and yoga in our gym.', 3, 1, 1, 0, 255188), @@ -8035,12 +8002,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (7956, 'ShapeCrafters', 'An inclusive and welcoming fitness center for individuals of all backgrounds.', 1, 1, 1, 0, 337483), (7957, 'CorePower Studio', 'We provide a supportive and motivating environment where you can achieve your strength and conditioning objectives.', 1, 1, 1, 0, 145745), (7958, 'ToneUp Gym', 'Our gym is committed to helping you reach your fitness goals through personalized training and expert coaching.', 1, 1, 1, 0, 329489), -(7959, 'Sculptor\'s Den', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 297817); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(7959, 'Sculptor\'s Den', 'Improve your physical and mental health through our wellness programs.', 1, 1, 1, 0, 297817), (7960, 'MuscleMax Fitness', 'Train with a purpose and develop the skills you need to reach your goals.', 3, 1, 1, 0, 191112), (7961, 'Gymfinity', 'Our gym is a space for you to find your passion for fitness and a healthier lifestyle.', 1, 1, 1, 0, 475256), (7962, 'PowerSculpt', 'A women-focused gym offering strength training and empowerment programs.', 1, 1, 1, 0, 384957), -(7963, 'IronGrip Gym', 'A state-of-the-art fitness facility offering a diverse range of equipment and classes for all fitness levels.', 1, 1, 1, 0, 331180), +(7963, 'IronGrip Gym', 'A state-of-the-art fitness facility offering a diverse range of equipment and classes for all fitness levels.', 1, 1, 1, 0, 331180); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (7964, 'Strength Forge', 'We\'re committed to making fitness accessible and enjoyable for all ages and abilities.', 1, 1, 1, 0, 483928), (7965, 'BodyPump Studio', 'Train with a purpose and develop the skills you need to reach your goals.', 3, 1, 1, 0, 489888), (7966, 'BodySymphony', 'Join us for outdoor adventures, from hiking and biking to kayaking and more.', 1, 1, 1, 0, 240315), @@ -8431,12 +8398,12 @@ INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `vi (8351, 'LumberGym', 'Train with a focus on mental toughness, discipline, and a winning mindset.', 3, 1, 1, 0, 135928), (8352, 'Peak Shape Gym', 'Train like a pro with top-notch equipment and expert coaching.', 3, 1, 1, 0, 106539), (8353, 'ShapeMaster', 'Our gym provides access to indoor and outdoor facilities, ensuring year-round fitness opportunities.', 3, 1, 1, 0, 277782), -(8354, 'PowerSculpt', 'Achieve your fitness goals with our well-equipped gym and professional trainers.', 3, 1, 1, 0, 138528); -INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES +(8354, 'PowerSculpt', 'Achieve your fitness goals with our well-equipped gym and professional trainers.', 3, 1, 1, 0, 138528), (8355, 'Workout World', 'Join a tight-knit fitness community that supports each other\'s growth.', 3, 1, 1, 0, 403696), (8356, 'StaminaStrong', 'Improve your physical and mental health through our wellness programs.', 3, 1, 1, 0, 458596), (8357, 'IronBody Gym', 'Experience fitness in a way that\'s exciting, challenging, and fulfilling.', 1, 1, 1, 0, 220804), -(8358, 'MuscleMania', 'A dedicated space for high-intensity workouts and functional fitness training.', 1, 1, 1, 0, 421518), +(8358, 'MuscleMania', 'A dedicated space for high-intensity workouts and functional fitness training.', 1, 1, 1, 0, 421518); +INSERT INTO `gym` (`gym_id`, `name`, `description`, `city_id`, `picture_id`, `video_id`, `average_rating`, `monthly_price`) VALUES (8359, 'ShapeMaster', 'We specialize in strength and conditioning for competitive sports and athletics.', 3, 1, 1, 0, 146273), (8360, 'TotalGym Fitness', 'Discover the transformative power of mindfulness and yoga in our gym.', 1, 1, 1, 0, 447409), (8361, 'Flex Gym', 'Improve your physical and mental health through our wellness programs.', 3, 1, 1, 0, 204210), @@ -8531,21 +8498,15 @@ INSERT INTO `picture` (`picture_id`) VALUES CREATE TABLE `ratings` ( `username` varchar(50) NOT NULL, `gym_id` int NOT NULL, - `rating` int NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - --- -------------------------------------------------------- + `rating` tinyint NOT NULL +) ; -- --- Table structure for table `trainer` +-- Dumping data for table `ratings` -- -CREATE TABLE `trainer` ( - `trainer_id` int NOT NULL, - `name` varchar(50) NOT NULL, - `gym_id` int NOT NULL, - `description` varchar(255) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +INSERT INTO `ratings` (`username`, `gym_id`, `rating`) VALUES +('user123', 67, 1); -- -------------------------------------------------------- @@ -8596,20 +8557,6 @@ INSERT INTO `video` (`video_id`) VALUES ALTER TABLE `city` ADD PRIMARY KEY (`city_id`); --- --- Indexes for table `comments` --- -ALTER TABLE `comments` - ADD PRIMARY KEY (`gym_id`,`username`,`comment_id`), - ADD KEY `username` (`username`); - --- --- Indexes for table `favorites` --- -ALTER TABLE `favorites` - ADD PRIMARY KEY (`username`,`gym_id`), - ADD KEY `gym_id` (`gym_id`); - -- -- Indexes for table `gym` -- @@ -8632,13 +8579,6 @@ ALTER TABLE `ratings` ADD PRIMARY KEY (`username`,`gym_id`), ADD KEY `gym_id` (`gym_id`); --- --- Indexes for table `trainer` --- -ALTER TABLE `trainer` - ADD PRIMARY KEY (`trainer_id`), - ADD KEY `gym_id` (`gym_id`); - -- -- Indexes for table `user` -- @@ -8674,12 +8614,6 @@ ALTER TABLE `gym` ALTER TABLE `picture` MODIFY `picture_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=725; --- --- AUTO_INCREMENT for table `trainer` --- -ALTER TABLE `trainer` - MODIFY `trainer_id` int NOT NULL AUTO_INCREMENT; - -- -- AUTO_INCREMENT for table `video` -- @@ -8690,20 +8624,6 @@ ALTER TABLE `video` -- Constraints for dumped tables -- --- --- Constraints for table `comments` --- -ALTER TABLE `comments` - ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`), - ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`gym_id`) REFERENCES `gym` (`gym_id`); - --- --- Constraints for table `favorites` --- -ALTER TABLE `favorites` - ADD CONSTRAINT `favorites_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`), - ADD CONSTRAINT `favorites_ibfk_2` FOREIGN KEY (`gym_id`) REFERENCES `gym` (`gym_id`); - -- -- Constraints for table `gym` -- @@ -8719,11 +8639,12 @@ ALTER TABLE `ratings` ADD CONSTRAINT `ratings_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE RESTRICT, ADD CONSTRAINT `ratings_ibfk_2` FOREIGN KEY (`gym_id`) REFERENCES `gym` (`gym_id`) ON DELETE CASCADE ON UPDATE RESTRICT; +-- +-- CHECK Constraints for table `ratings` -- --- Constraints for table `trainer` --- -ALTER TABLE `trainer` - ADD CONSTRAINT `trainer_ibfk_1` FOREIGN KEY (`gym_id`) REFERENCES `gym` (`gym_id`); +ALTER TABLE ratings + ADD CONSTRAINT chk_rating + CHECK (rating >= 1 AND rating <= 5); -- -- Constraints for table `user` @@ -8732,6 +8653,7 @@ ALTER TABLE `user` ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`); COMMIT; + /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -- GitLab