1 | delete from UserHasProgram;
|
---|
2 | delete from UserHasDays;
|
---|
3 | delete from DayHasMeal;
|
---|
4 | delete from MealHasIngredient;
|
---|
5 | delete from DayHasWorkout;
|
---|
6 | delete from WorkoutHasExercise;
|
---|
7 | delete from WorkoutProgramHasWorkout;
|
---|
8 |
|
---|
9 |
|
---|
10 | delete from Meal;
|
---|
11 | delete from Workout;
|
---|
12 | delete from _User;
|
---|
13 | delete from _Day;
|
---|
14 | delete from PersIngrsIsOfType;
|
---|
15 | delete from PersonalizedIngredient;
|
---|
16 | delete from Ingredient;
|
---|
17 | delete from PersExerIsOfType;
|
---|
18 | delete from PersonalizedExercise;
|
---|
19 | delete from Exercise;
|
---|
20 |
|
---|
21 | delete from WorkoutProgram;
|
---|
22 |
|
---|
23 |
|
---|
24 |
|
---|
25 | INSERT INTO _User (uID, name, password, age, height, weight, role)
|
---|
26 | VALUES
|
---|
27 | (1, 'JohnDoe', 'password123', 25, 180, 75, 'user'),
|
---|
28 | (2, 'JaneDoe', 'securepass', 30, 165, 60, 'admin');
|
---|
29 |
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | INSERT INTO _Day (dID, date)
|
---|
34 | VALUES
|
---|
35 | (1, '2024-02-08'),
|
---|
36 | (2, '2024-06-08'),
|
---|
37 | (3, '2024-02-09');
|
---|
38 |
|
---|
39 |
|
---|
40 |
|
---|
41 | INSERT INTO Workout (wID, duration, name)
|
---|
42 | VALUES
|
---|
43 | (1, 60, 'Morning Workout'),
|
---|
44 | (2, 45, 'Evening Workout');
|
---|
45 |
|
---|
46 |
|
---|
47 |
|
---|
48 | INSERT INTO Meal (mID, name, type, uID)
|
---|
49 | VALUES
|
---|
50 | (1, 'Breakfast', 'Healthy', 1),
|
---|
51 | (2, 'Lunch', 'Balanced', 2);
|
---|
52 |
|
---|
53 |
|
---|
54 | INSERT INTO Ingredient (iID, name, calories, protein, carbs, fats)
|
---|
55 | VALUES
|
---|
56 | (1, 'Eggs', 70, 6, 1, 5),
|
---|
57 | (2, 'Chicken Breast', 165, 31, 0, 3);
|
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|
61 | INSERT INTO PersonalizedIngredient (piID, quantity)
|
---|
62 | VALUES
|
---|
63 | (1, 2),
|
---|
64 | (2, 150);
|
---|
65 |
|
---|
66 |
|
---|
67 | INSERT INTO PersIngrsIsOfType (iID, piID)
|
---|
68 | VALUES
|
---|
69 | (1, 2),
|
---|
70 | (2, 2);
|
---|
71 |
|
---|
72 |
|
---|
73 | INSERT INTO Exercise (eID, name, type)
|
---|
74 | VALUES
|
---|
75 | (1, 'Running', 'Cardio'),
|
---|
76 | (2, 'Bench Press', 'Bodybuilding');
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 | INSERT INTO PersonalizedExercise (peID, reps, sets, weight, time)
|
---|
81 | VALUES
|
---|
82 | (1, 10, 3, 50, NULL),
|
---|
83 | (2, 12, 4, 80, null);
|
---|
84 |
|
---|
85 |
|
---|
86 | INSERT INTO PersExerIsOfType (eID, peID)
|
---|
87 | VALUES
|
---|
88 | (2, 1),
|
---|
89 | (2, 2);
|
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 | INSERT INTO WorkoutProgram (wpID, name)
|
---|
95 | VALUES
|
---|
96 | (1, 'Weight Loss Program'),
|
---|
97 | (2, 'Muscle Building Program');
|
---|
98 |
|
---|
99 |
|
---|
100 |
|
---|
101 | INSERT INTO UserHasDays (uID, dID)
|
---|
102 | VALUES
|
---|
103 | (1, 1),
|
---|
104 | (1, 3),
|
---|
105 | (2, 2);
|
---|
106 |
|
---|
107 |
|
---|
108 |
|
---|
109 | INSERT INTO UserHasProgram (uID, wpID)
|
---|
110 | VALUES
|
---|
111 | (1, 1),
|
---|
112 | (2, 2);
|
---|
113 |
|
---|
114 |
|
---|
115 |
|
---|
116 | INSERT INTO DayHasWorkout (wID, dID)
|
---|
117 | VALUES
|
---|
118 | (1, 1),
|
---|
119 | (2, 2);
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 | INSERT INTO WorkoutProgramHasWorkout (wID, wpID)
|
---|
124 | VALUES
|
---|
125 | (1, 1),
|
---|
126 | (2, 2);
|
---|
127 |
|
---|
128 |
|
---|
129 | INSERT INTO DayHasMeal (mID, dID)
|
---|
130 | VALUES
|
---|
131 | (1, 1),
|
---|
132 | (2, 2);
|
---|
133 |
|
---|
134 |
|
---|
135 | INSERT INTO MealHasIngredient (mID, piID)
|
---|
136 | VALUES
|
---|
137 | (1, 1),
|
---|
138 | (2, 2);
|
---|
139 |
|
---|
140 |
|
---|
141 | INSERT INTO WorkoutHasExercise (peID, wID)
|
---|
142 | VALUES
|
---|
143 | (1, 1),
|
---|
144 | (2, 2);
|
---|