[Pharo] Personal fitness tracker web app.
Update descriptor system.
src/MyFitnessTracker-Database/MFTDescriptorSystem.class.st
@@ -32,7 +32,7 @@
32
32
newAttributeNamed: #primaryMuscleGroup type: MFTMuscleGroup;
33
33
newAttributeNamed: #latinName type: String;
34
34
newAttributeNamed: #englishName type: String;
35
Removed:
newAttributeNamed: #function type: String
35
Added:
newAttributeNamed: #description type: String
36
36
]
37
37
38
38
{ #category : 'class models' }
@@ -42,7 +42,7 @@
42
42
aClassModel
43
43
newAttributeNamed: #englishName type: String;
44
44
newAttributeNamed: #frenchName type: String;
45
Removed:
newAttributeNamed: #function type: String;
45
Added:
newAttributeNamed: #description type: String;
46
46
newAttributeNamed: #muscles collectionOf: MFTMuscle
47
47
]
48
48
@@ -93,7 +93,8 @@
93
93
(aClassModel newAttributeNamed: #id) useDirectAccess: true.
94
94
aClassModel
95
95
newAttributeNamed: #user type: MFTUser;
96
Removed:
newAttributeNamed: #date type: DateAndTime;
96
Added:
newAttributeNamed: #datePlanned type: DateAndTime;
97
Added:
newAttributeNamed: #dateCompleted type: DateAndTime;
97
98
newAttributeNamed: #primaryMuscleGroup type: MFTMuscleGroup;
98
99
newAttributeNamed: #secondaryMuscleGroups
99
100
collectionOf: MFTMuscleGroup;
@@ -129,15 +130,9 @@
129
130
(aDescriptor newMapping: DirectMapping)
130
131
from: #primaryMuscleGroup
131
132
to: ((self tableNamed: 'MUSCLEGROUP') fieldNamed: 'id').
132
Removed:
(aDescriptor newMapping: DirectMapping)
133
Removed:
from: #latinName
134
Removed:
to: (table fieldNamed: 'latinName').
135
Removed:
(aDescriptor newMapping: DirectMapping)
136
Removed:
from: #englishName
137
Removed:
to: (table fieldNamed: 'englishName').
138
Removed:
(aDescriptor newMapping: DirectMapping)
139
Removed:
from: #function
140
Removed:
to: (table fieldNamed: 'function')
133
Added:
aDescriptor directMappingFor: #latinName.
134
Added:
aDescriptor directMappingFor: #englishName.
135
Added:
aDescriptor directMappingFor: #description
141
136
]
142
137
143
138
{ #category : 'descriptors' }
@@ -149,7 +144,7 @@
149
144
aDescriptor directMappingFor: #id.
150
145
aDescriptor directMappingFor: #englishName.
151
146
aDescriptor directMappingFor: #frenchName.
152
Removed:
aDescriptor directMappingFor: #function
147
Added:
aDescriptor directMappingFor: #description
153
148
]
154
149
155
150
{ #category : 'descriptors' }
@@ -162,7 +157,7 @@
162
157
(aDescriptor newMapping: DirectMapping)
163
158
from: #exercise
164
159
to: ((self tableNamed: 'EXERCISE') fieldNamed: 'id').
165
Removed:
aDescriptor directMappingFor: #setNumber.
160
Added:
166
161
aDescriptor directMappingFor: #setGroup.
167
162
aDescriptor directMappingFor: #reps.
168
163
aDescriptor directMappingFor: #load.
@@ -194,7 +189,8 @@
194
189
(aDescriptor newMapping: DirectMapping)
195
190
from: #user
196
191
to: ((self tableNamed: 'USER') fieldNamed: 'id').
197
Removed:
aDescriptor directMappingFor: #date.
192
Added:
aDescriptor directMappingFor: #datePlanned.
193
Added:
aDescriptor directMappingFor: #dateCompleted.
198
194
(aDescriptor newMapping: DirectMapping)
199
195
from: #primaryMuscleGroup
200
196
to: ((self tableNamed: 'MUSCLEGROUP') fieldNamed: 'id').
@@ -228,7 +224,7 @@
228
224
muscleGroupField := aTable
229
225
createFieldNamed: 'muscleGroupId'
230
226
type: platform integer.
231
Removed:
aTable createFieldNamed: 'function' type: (platform varChar: 100).
227
Added:
aTable createFieldNamed: 'description' type: (platform varChar: 120).
232
228
233
229
aTable
234
230
addForeignKeyFrom: muscleGroupField
@@ -242,7 +238,7 @@
242
238
aTable
243
239
createFieldNamed: 'englishName' type: (platform varChar: 100);
244
240
createFieldNamed: 'frenchName' type: (platform varChar: 100);
245
Removed:
createFieldNamed: 'function' type: (platform varChar: 100)
241
Added:
createFieldNamed: 'description' type: (platform varChar: 120)
246
242
]
247
243
248
244
{ #category : 'tables' }
@@ -280,7 +276,8 @@
280
276
| userField |
281
277
(aTable createFieldNamed: 'id' type: platform serial) bePrimaryKey.
282
278
userField := aTable createFieldNamed: 'userId' type: platform integer.
283
Removed:
aTable createFieldNamed: 'date' type: platform date.
279
Added:
aTable createFieldNamed: 'datePlanned' type: platform date.
280
Added:
aTable createFieldNamed: 'dateCompleted' type: platform date.
284
281
aTable
285
282
createFieldNamed: 'primaryMuscleGroupId'
286
283
type: (platform varChar: 100).
@@ -316,7 +313,7 @@
316
313
to: ((self tableNamed: 'EXERCISE') fieldNamed: 'id')
317
314
]
318
315
319
Removed:
{ #category : 'as yet unclassified' }
316
Added:
{ #category : 'tables' }
320
317
MFTDescriptorSystem >> tableForWORKOUT_MUSCLEGROUP: aTable [
321
318
322
319
| workoutField mgField |