Skip to content

Commit e67e43a

Browse files
committed
Add migration to last_course_viewed attribute`
1 parent f40f81c commit e67e43a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lms/lmsdb/bootstrap.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ def _api_keys_migration() -> bool:
237237
return True
238238

239239

240+
def _last_course_viewed_migration() -> bool:
241+
User = models.User
242+
_add_not_null_column(User, User.last_course_viewed)
243+
return True
244+
245+
240246
def main():
241247
with models.database.connection_context():
242248
models.database.create_tables(models.ALL_MODELS, safe=True)
@@ -247,6 +253,7 @@ def main():
247253
models.create_demo_users()
248254

249255
_api_keys_migration()
256+
_last_course_viewed_migration()
250257
text_fixer.fix_texts()
251258
import_tests.load_tests_from_path('/app_dir/notebooks-tests')
252259

0 commit comments

Comments
 (0)