Updated SQL schema file.

Commit
4a77e47d092cf351ba1be32424ff93df23bdd559
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
create-mft-db.sql
index 04a490aa..e62b6c3c 100644..100644
@@ -46,167 +46,153 @@
46 46
47 47 CREATE TABLE "Muscle_Groups" (
48 48 "id" INTEGER NOT NULL UNIQUE,
49 Removed: "english_name" INTEGER NOT NULL UNIQUE,
49 Added: "english_name" TEXT NOT NULL UNIQUE,
50 Added: "french_name" TEXT NOT NULL UNIQUE,
50 51 "description" TEXT,
51 52 PRIMARY KEY("id" AUTOINCREMENT)
52 53 );
53 54
54 Removed: INSERT INTO Muscle_Groups ("id", "english_name", "description") VALUES
55 Added: INSERT INTO Muscle_Groups ("id", "english_name", "french_name", "description") VALUES
55 56 -- Upper body
56 Removed: ('1', 'neck', ''),
57 Removed: ('2', 'back', ''),
58 Removed: ('3', 'shoulder', ''),
59 Removed: ('4', 'chest', ''),
60 Removed: ('5', 'triceps', ''),
61 Removed: ('6', 'biceps', ''),
62 Removed: ('7', 'forearm', ''),
57 Added: ('1', 'neck', 'cou', NULL),
58 Added: ('2', 'upper back', 'dos supérieur', NULL),
59 Added: ('3', 'shoulder', 'épaule', NULL),
60 Added: ('4', 'chest', 'torse', NULL),
61 Added: ('5', 'triceps', 'triceps', NULL),
62 Added: ('6', 'biceps', 'biceps', NULL),
63 Added: ('7', 'forearm', 'avant-bras', NULL),
63 64 -- Core
64 Removed: ('8', 'abdominals', ''),
65 Removed: ('9', 'hip', ''),
66 Removed: ('10', 'glutes', ''),
65 Added: ('8', 'abdominals', 'abdominaux', NULL),
66 Added: ('9', 'lower back', 'dos inférieur', NULL),
67 Added: ('10', 'hip', 'hanche', NULL),
68 Added: ('11', 'glutes', 'fessier', NULL),
67 69 -- Lower body
68 Removed: ('11', 'quad', ''),
69 Removed: ('12', 'hamstring', ''),
70 Removed: ('13', 'calf', '');
70 Added: ('12', 'quad', 'quadriceps', 'extends the knee'),
71 Added: ('13', 'hamstring', 'ischio-jambier', 'flexes the knee and extends the hip'),
72 Added: ('14', 'calf', 'mollet', NULL);
71 73
72 74 CREATE TABLE "Muscles" (
73 75 "id" INTEGER NOT NULL UNIQUE,
74 76 "latin_name" TEXT NOT NULL UNIQUE,
75 Removed: "muscle_group_id" INTEGER,
77 Added: "muscle_group_id" INTEGER NOT NULL,
76 78 "english_name" TEXT,
77 Removed: "description" TEXT,
79 Added: "function" TEXT,
78 80 FOREIGN KEY("muscle_group_id") REFERENCES Muscle_Groups("id"),
79 81 PRIMARY KEY("id" AUTOINCREMENT)
80 82 );
81 83
82 Removed: INSERT INTO Muscles ("latin_name", "english_name", "description") VALUES
84 Added: INSERT INTO Muscles ("latin_name", "muscle_group_id", "english_name", "function") VALUES
83 85 -- Upper body
86 Added: ('latissimus dorsi',
87 Added: '2',
88 Added: 'lats',
89 Added: 'adducts and extends the shoulder'),
90 Added: ('trapezius',
91 Added: '2',
92 Added: 'trap',
93 Added: 'assists in moving and stabilizing the shoulder blades'),
84 94 ('deltoideus',
85 95 '3',
86 96 'delts',
87 Removed: ''
88 Removed: ),
97 Added: NULL),
98 Added: ('pectoralis major',
99 Added: '4',
100 Added: 'pecs',
101 Added: 'performs shoulder flexion and adduction'),
89 102 ('pectorali minor',
90 103 '4',
91 104 'pectoral',
92 Removed: 'Located beneath the pectoralis major, it plays a role in stabilizing the shoulder blade and assisting in deep breathing.'
93 Removed: ),
105 Added: 'plays a role in stabilizing the shoulder blade and assists in deep breathing'),
106 Added: ('triceps brachii',
107 Added: '5',
108 Added: 'triceps',
109 Added: NULL),
110 Added: ('biceps brachii',
111 Added: '6',
112 Added: 'biceps',
113 Added: NULL),
94 114 ('extensor carpi radialias brevis',
95 Removed: '',
96 Removed: '',
97 Removed: 'Located in the forearm, it is responsible for extending the wrist and abducting the hand.'
98 Removed: ),
115 Added: '7',
116 Added: NULL,
117 Added: 'Responsible for extending the wrist and abducting the hand'),
99 118 ('brachio radialis',
100 Removed: '',
101 Removed: '',
102 Removed: 'Located in the forearm, it is responsible for flexing the forearm at the elbow joint.'
103 Removed: ),
119 Added: '7',
120 Added: NULL,
121 Added: 'Responsible for flexing the forearm at the elbow joint'),
104 122 ('flexor carpi radialis',
105 Removed: '',
106 Removed: '',
107 Removed: 'Located in the forearm, it is responsible for flexing the wrist and abducting the hand.'
108 Removed: ),
123 Added: '7',
124 Added: NULL,
125 Added: 'Responsible for flexing the wrist and abducting the hand'),
109 126 ('extensor carpi ulnaris',
110 Removed: '',
111 Removed: '',
112 Removed: 'Located in the forearm, it is responsible for extending the wrist and adducting the hand.'
113 Removed: ),
127 Added: '7',
128 Added: NULL,
129 Added: 'Responsible for extending the wrist and adducting the hand'),
114 130 ('flexor carpi ulnaris',
115 Removed: '',
116 Removed: '',
117 Removed: 'Located in the forearm, it is responsible for flexing the wrist and adducting the hand.'
118 Removed: ),
119 Removed: ('biceps brachii',
120 Removed: '',
121 Removed: 'biceps',
122 Removed: ''
123 Removed: ),
124 Removed: ('latissimus dorsi',
125 Removed: '',
126 Removed: 'lats',
127 Removed: 'Also known as the "lats," these muscles are located in the upper back and are responsible for shoulder adduction and extension.'
128 Removed: ),
129 Removed: ('triceps brachii',
130 Removed: '',
131 Removed: 'triceps',
132 Removed: ''
133 Removed: ),
134 Removed: ('trapezius',
135 Removed: '',
136 Removed: 'trap',
137 Removed: 'The trapezius muscles are located in the upper back and neck. They play a role in moving and stabilizing the shoulder blades.'
138 Removed: ),
131 Added: '7',
132 Added: NULL,
133 Added: 'Responsible for flexing the wrist and adducting the hand'),
139 134 ('extensor carpi radialis longus',
140 Removed: '',
141 Removed: 'Extensor Carpi Radialis Longus',
142 Removed: 'Located in the forearm, it is responsible for extending the wrist and abducting the hand.'
143 Removed: ),
144 Removed: ('pectoralis major',
145 Removed: '',
146 Removed: '',
147 Removed: 'Commonly known as the "pecs," these muscles are in the chest and are responsible for shoulder flexion and adduction.'),
135 Added: '7',
136 Added: NULL,
137 Added: 'Responsible for extending the wrist and abducting the hand'),
138 Added:
148 139 -- Core
149 140 ('abdominalis',
150 Removed: '',
141 Added: '8',
151 142 'abs',
152 Removed: 'Deepest abdominal muscle. Wraps around the spine for protection and stability.'
153 Removed: ),
143 Added: 'wraps around the spine for protection and stability'),
154 144 ('obliquus externus abdominis',
155 Removed: '',
145 Added: '8',
156 146 'external oblique',
157 Removed: 'Located on the front and side of the abdomen.'
158 Removed: ),
147 Added: NULL),
159 148 ('rectus abdominis',
160 Removed: '',
149 Added: '8',
161 150 'six-pack',
162 Removed: 'Located along the front of the abdomen. Colloquially known as the "six-pack"'
163 Removed: ),
151 Added: NULL),
152 Added: ('obliquus internus abdominis',
153 Added: '8',
154 Added: 'internal oblique',
155 Added: 'Located on the front and side of the abdomen'),
164 156 ('erector spinae',
165 Removed: '',
157 Added: '9',
166 158 'erectors',
167 Removed: 'This group of muscles runs along the spine and is responsible for extending the vertebral column and maintaining an upright posture.'
168 Removed: ),
169 Removed: ('gluteus minimus',
170 Removed: '',
171 Removed: 'glutes',
172 Removed: 'Located in the buttocks, it assists in hip abduction and medial rotation, working with the gluteus medius.'
173 Removed: ),
174 Removed: ('gluteus medius',
175 Removed: '',
176 Removed: 'glutes',
177 Removed: 'Located in the buttocks, it plays a role in hip abduction and medial rotation.'
178 Removed: ),
159 Added: 'extends the vertebral column and ensures maintaining an upright posture'),
179 160 ('gluteus maximus',
180 Removed: '',
181 Removed: 'glutes',
182 Removed: 'The largest muscle in the buttocks, responsible for hip extension, outward rotation, and abduction.'
183 Removed: ),
184 Removed: ('obliquus internus abdominis',
185 Removed: '',
186 Removed: 'internal oblique',
187 Removed: 'Located on the front and side of the abdomen.'
188 Removed: ),
161 Added: '11',
162 Added: NULL,
163 Added: 'performs hip extension, outward rotation, and abduction'),
164 Added: ('gluteus medius',
165 Added: '11',
166 Added: NULL,
167 Added: 'plays a role in hip abduction and medial rotation'),
168 Added: ('gluteus minimus',
169 Added: '11',
170 Added: NULL,
171 Added: 'assists in hip abduction and medial rotation, works with the gluteus medius'),
172 Added:
189 173 -- Lower body
190 Removed: ('soleus',
191 Removed: '',
192 Removed: 'calf',
193 Removed: 'Located in the calf, it assists the gastrocnemius in plantar flexion and helps maintain posture.'
194 Removed: ),
195 174 ('quadriceps femoris',
196 Removed: '',
175 Added: '12',
197 176 'quad',
198 Removed: 'A group of four muscles on the front of the thigh, responsible for knee extension.'
199 Removed: ),
200 Removed: ('hamstringus',
201 Removed: '',
177 Added: NULL),
178 Added: ('biceps femoris',
179 Added: '13',
202 180 'hamstrings',
203 Removed: 'This group of muscles includes the biceps femoris, semitendinosus, and semimembranosus. They are located in the back of the thigh and are responsible for knee flexion and hip extension.'
204 Removed: ),
181 Added: NULL),
182 Added: ('semitendinosus',
183 Added: '13',
184 Added: 'hamstrings',
185 Added: NULL),
186 Added: ('semimembranosus',
187 Added: '13',
188 Added: 'hamstrings',
189 Added: NULL),
205 190 ('gastrocnemius',
206 Removed: '',
207 Removed: 'calf',
208 Removed: 'Located in the calf, it is responsible for plantar flexion of the foot (pointing toes).'
209 Removed: );
191 Added: '14',
192 Added: NULL, 'performs plantar flexion of the foot (pointing toes)'),
193 Added: ('soleus',
194 Added: '14',
195 Added: NULL, 'assists the gastrocnemius in plantar flexion and helps maintain posture');
210 196
211 197 CREATE TABLE "Reps" (
212 198 "id" INTEGER NOT NULL UNIQUE,