Unknown column when upgrading from juniper to koa

Hi!

After upgrading from Jupiter to Koa with:
tutor local upgrade --from=juniper

I found an error 500 when trying to login or register on the site:

This is what appear on the logs. Any clue?

lms_1               | Traceback (most recent call last):
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
lms_1               |     response = get_response(request)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
lms_1               |     response = self.process_exception_by_middleware(e, request)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
lms_1               |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1               |   File "/opt/pyenv/versions/3.8.6/lib/python3.8/contextlib.py", line 75, in inner
lms_1               |     return func(*args, **kwds)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/http.py", line 40, in inner
lms_1               |     return func(request, *args, **kwargs)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/ratelimit/decorators.py", line 24, in _wrapped
lms_1               |     return fn(request, *args, **kw)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
lms_1               |     response = view_func(request, *args, **kwargs)
lms_1               |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/decorators.py", line 25, in wrapped_view
lms_1               |     resp = view_func(request, *args, **kwargs)
lms_1               |   File "./openedx/core/djangoapps/user_authn/views/login_form.py", line 215, in login_and_registration_form
lms_1               |     'third_party_auth': third_party_auth_context(request, redirect_to, third_party_auth_hint),
lms_1               |   File "./openedx/core/djangoapps/user_authn/utils.py", line 49, in third_party_auth_context
lms_1               |     for enabled in third_party_auth.provider.Registry.displayed_for_login(tpa_hint=tpa_hint):
lms_1               |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/provider.py", line 69, in displayed_for_login
lms_1               |     for provider in cls.enabled()
lms_1               |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/provider.py", line 52, in enabled
lms_1               |     return sorted(cls._enabled_providers(), key=lambda provider: provider.name)
lms_1               |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/provider.py", line 38, in _enabled_providers
lms_1               |     if SAMLConfiguration.is_enabled(Site.objects.get_current(get_current_request()), 'default'):
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/config_models/models.py", line 157, in is_enabled
lms_1               |     return cls.current(*key_fields).enabled
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/config_models/models.py", line 141, in current
lms_1               |     current = cls.objects.filter(**key_dict).order_by('-change_date')[0]
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 308, in __getitem__
lms_1               |     qs._fetch_all()
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1242, in _fetch_all
lms_1               |     self._result_cache = list(self._iterable_class(self))
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 55, in __iter__
lms_1               |     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
lms_1               |     cursor.execute(sql, params)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
lms_1               |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
lms_1               |     return executor(sql, params, many, context)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
lms_1               |     return self.cursor.execute(sql, params)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 89, in __exit__
lms_1               |     raise dj_exc_value.with_traceback(traceback) from exc_value
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
lms_1               |     return self.cursor.execute(sql, params)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 71, in execute
lms_1               |     return self.cursor.execute(query, args)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
lms_1               |     res = self._query(query)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
lms_1               |     db.query(q)
lms_1               |   File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
lms_1               |     _mysql.connection.query(self, query)
lms_1               | django.db.utils.OperationalError: (1054, "Unknown column 'third_party_auth_samlconfiguration.is_public' in 'field list'")
nginx_1             | 172.18.0.4 - - [14/Dec/2020:11:57:56 +0000] http://myhost.com "GET /login?next=%2Fcourses HTTP/1.1" 500 7778 "https://myhost.com/courses" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "78.30.8.189"
lms_1               | [pid: 7|app: 0|req: 109/505] 172.18.0.14 () {52 vars in 1736 bytes} [Mon Dec 14 11:57:55 2020] GET /login?next=%2Fcourses => generated 7778 bytes in 205 msecs (HTTP/1.0 500) 6 headers in 367 bytes (1 switches on core 0)
nginx_1             | 172.18.0.4 - - [14/Dec/2020:11:57:56 +0000] http://myhost.com "GET /static/mytheme/css/lms-main-v1.bb1d3231d84e.css HTTP/1.1" 304 0 "https://myhost.com/login?next=%2Fcourses" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "78.30.8.189"
lms_1               | [pid: 21|app: -1|req: -1/506] 172.18.0.14 () {50 vars in 1706 bytes} [Mon Dec 14 11:57:56 2020] GET /static/mytheme/css/lms-main-v1.bb1d3231d84e.css => generated 0 bytes in 0 msecs (HTTP/1.0 304) 0 headers in 29 bytes (0 switches on core 0)
lms_1               | [pid: 21|app: -1|req: -1/508] 172.18.0.14 () {50 vars in 1698 bytes} [Mon Dec 14 11:57:56 2020] GET /static/bundles/commons.70becb8238dc9f0b2538.b7359b710d90.js => generated 0 bytes in 0 msecs (HTTP/1.0 304) 0 headers in 29 bytes (0 switches on core 0)
lms_1               | [pid: 7|app: -1|req: -1/508] 172.18.0.14 () {50 vars in 1662 bytes} [Mon Dec 14 11:57:56 2020] GET /static/js/lms-application.0e3fae472a20.js => generated 0 bytes in 0 msecs (HTTP/1.0 304) 0 headers in 29 bytes (0 switches on core 0)
lms_1               | [pid: 21|app: -1|req: -1/509] 172.18.0.14 () {50 vars in 1662 bytes} [Mon Dec 14 11:57:56 2020] GET /static/js/lms-main_vendor.3c3c9a2604d6.js => generated 0 bytes in 0 msecs (HTTP/1.0 304) 0 headers in 29 bytes (0 switches on core 0)
nginx_1             | 172.18.0.4 - - [14/Dec/2020:11:57:56 +0000] http://myhost.com "GET /static/bundles/commons.70becb8238dc9f0b2538.b7359b710d90.js HTTP/1.1" 304 0 "https://myhost.com/login?next=%2Fcourses" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "78.30.8.189"
nginx_1             | 172.18.0.4 - - [14/Dec/2020:11:57:56 +0000] http://myhost.com "GET /static/js/lms-application.0e3fae472a20.js HTTP/1.1" 304 0 "https://myhost.com/login?next=%2Fcourses" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "78.30.8.189"
nginx_1             | 172.18.0.4 - - [14/Dec/2020:11:57:56 +0000] http://myhost.com "GET /static/js/lms-main_vendor.3c3c9a2604d6.js HTTP/1.1" 304 0 "https://myhost.com/login?next=%2Fcourses" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "78.30.8.189"
``

Did you run tutor local quickstart? (you should)

1 Like

I just did:

tutor images build openedx    
tutor local reboot

Doing now:

tutor local quickstart

and it performed the necessary database migrations.

Thanks @regis. This saved my day. I cannot stop recommending tutor and your work to everyone.

2 Likes