Immigration error when upgrading Quince from Palm.
Hello everyone,
I got migration error when upgrading from Palm version to Quince version. I think I encountered this problem because the data in the database did not match.
I switched from Tutor version 16.1.8 to version 17.0.2.
OS: Ubuntu 22.04
Works at Tutor Local
Thanks
File "/openedx/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 255, in apply_migration
migration_recorded = True
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 166, in __exit__
self.execute(sql)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 201, in execute
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 255, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (3780, "Referencing column 'enterprise_customer_id' and referenced column 'uuid' in foreign key constraint 'enterprise_chapter8_enterprise_customer__e07a7628_fk_enterpris' are incompatible.")
Error: Command failed with status 1: docker compose -f /home/appadm/.local/share/tutor/env/local/docker-compose.yml -f /home/appadm/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/appadm/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm lms-job sh -c dockerize -wait tcp://172.17.13.33:3306 -timeout 20s dockerize -wait tcp://172.17.13.33:27017 -timeout 20s
echo "Loading settings $DJANGO_SETTINGS_MODULE"
./manage.py lms migrate
# Create oauth apps for CMS SSO
# https://github.com/openedx/edx-platform/blob/master/docs/guides/studio_oauth.rst
./manage.py lms manage_user cms @openedx --unusable-password
./manage.py lms create_dot_application \
--grant-type authorization-code \
--redirect-uris "https://test-cms.allinkitukiye.com/complete/edx-oauth2/" \
--client-id cms-sso \
--client-secret 8ILkz2Yy73JK05EPmwGWXk1 \
--scopes user_id \
--skip-authorization
./manage.py lms create_dot_application \
--update cms-sso cms \