Closed russellwjoel closed 4 years ago
standardize table names. cognifit
change in_use to is_active in questions table
nullable: defaultanswer, , questionSubText, dependant outcome
Answers remove
__table_args__ = (db.UniqueConstraint('question_response_id', 'user_id', name='_user_response'),)
question_options -> question_responses
The intention is to add certain tickets to a db features and perform a fresh alembic history. Addressing some of the current db shortfalls.
[ ] Remove javascript conventions (i.e. Camel) from python model definitions in db columns. WeeklySleepReport. reportNumber | reportStartDate | reportEndDate
[ ] Rename: WeeklySleepReport -> SleepReport. ( Reports are not weekly. They are 7 days.) ??
[ ] Add unique flag on columns -> questionnaire_sections.name, & resonse_values.name
[ ] FitbitToken, expires_in -> expires_at. Since it is not a lag time but an absolute time.
[ ] Now that the applicaiton has many functional partitions it we should add pre fixes for specific tables. e.g. cognifit extend for . forms , fitbit_ . at the moment there is just sleep which is not very useful if were were to expand to a different device?? apply_sleep . fitbit_sleep?
[ ] nullable: defaultanswer, , questionSubText, dependant outcome
[ ] remove unique constraint from answers: __table_args__ = (db.UniqueConstraint('question_response_id', 'user_id', name='_user_response'),) - (allows for multiple inserts of answers to the same questions.) .
[ ] change table name: question_options -> question_responses
ORM
FitbitTokens .
GENERAL