Actions
Issue #4909
closedmigrations fail on mariadb
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
"error: Unable to open /usr/lib/rpm/rpmrc for reading: No such file or directory.\nSystem check identified some issues:\n\nWARNINGS:\nrpm.UpdateRecord.id: (fields.W162) MySQL does not support a database index on longtext columns.\n\tHINT: An index won't be created. Silence this warning if you don't care about it.\nTraceback (most recent call last):\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 82, in _execute\n return self.cursor.execute(sql)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/mysql/base.py\", line 71, in execute\n return self.cursor.execute(query, args)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 206, in execute\n res = self._query(query)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 312, in _query\n db.query(q)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/connections.py\", line 224, in query\n _mysql.connection.query(self, query)\nMySQLdb._exceptions.OperationalError: (1170, \"BLOB/TEXT column 'digest' used in key specification without a key length\")\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/travis/virtualenv/python3.7.1/bin/django-admin\", line 10, in <module>\n sys.exit(execute_from_command_line())\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line\n utility.execute()\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/__init__.py\", line 375, in execute\n self.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 323, in run_from_argv\n self.execute(*args, **cmd_options)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 364, in execute\n output = self.handle(*args, **options)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 83, in wrapped\n res = handle_func(*args, **kwargs)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/commands/migrate.py\", line 234, in handle\n fake_initial=fake_initial,\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 117, in migrate\n state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 147, in _migrate_all_forwards\n state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 245, in apply_migration\n state = migration.apply(state, schema_editor)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/migration.py\", line 124, in apply\n operation.database_forwards(self.app_label, schema_editor, old_state, project_state)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/operations/models.py\", line 92, in database_forwards\n schema_editor.create_model(model)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/base/schema.py\", line 307, in create_model\n self.execute(sql, params or None)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/base/schema.py\", line 137, in execute\n cursor.execute(sql, params)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 67, in execute\n return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 76, in _execute_with_wrappers\n return executor(sql, params, many, context)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 84, in _execute\n return self.cursor.execute(sql, params)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/utils.py\", line 89, in __exit__\n raise dj_exc_value.with_traceback(traceback) from exc_value\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 82, in _execute\n return self.cursor.execute(sql)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/mysql/base.py\", line 71, in execute\n return self.cursor.execute(query, args)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 206, in execute\n res = self._query(query)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 312, in _query\n db.query(q)\n File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/connections.py\", line 224, in query\n _mysql.connection.query(self, query)\ndjango.db.utils.OperationalError: (1170, \"BLOB/TEXT column 'digest' used in key specification without a key length\")",
"stderr_lines":[
"error: Unable to open /usr/lib/rpm/rpmrc for reading: No such file or directory.",
"System check identified some issues:",
"",
"WARNINGS:",
"rpm.UpdateRecord.id: (fields.W162) MySQL does not support a database index on longtext columns.",
"\tHINT: An index won't be created. Silence this warning if you don't care about it.",
"Traceback (most recent call last):",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 82, in _execute",
" return self.cursor.execute(sql)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/mysql/base.py\", line 71, in execute",
" return self.cursor.execute(query, args)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 206, in execute",
" res = self._query(query)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 312, in _query",
" db.query(q)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/connections.py\", line 224, in query",
" _mysql.connection.query(self, query)",
"MySQLdb._exceptions.OperationalError: (1170, \"BLOB/TEXT column 'digest' used in key specification without a key length\")",
"",
"The above exception was the direct cause of the following exception:",
"",
"Traceback (most recent call last):",
" File \"/home/travis/virtualenv/python3.7.1/bin/django-admin\", line 10, in <module>",
" sys.exit(execute_from_command_line())",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line",
" utility.execute()",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/__init__.py\", line 375, in execute",
" self.fetch_command(subcommand).run_from_argv(self.argv)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 323, in run_from_argv",
" self.execute(*args, **cmd_options)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 364, in execute",
" output = self.handle(*args, **options)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/base.py\", line 83, in wrapped",
" res = handle_func(*args, **kwargs)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/core/management/commands/migrate.py\", line 234, in handle",
" fake_initial=fake_initial,",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 117, in migrate",
" state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 147, in _migrate_all_forwards",
" state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/executor.py\", line 245, in apply_migration",
" state = migration.apply(state, schema_editor)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/migration.py\", line 124, in apply",
" operation.database_forwards(self.app_label, schema_editor, old_state, project_state)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/migrations/operations/models.py\", line 92, in database_forwards",
" schema_editor.create_model(model)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/base/schema.py\", line 307, in create_model",
" self.execute(sql, params or None)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/base/schema.py\", line 137, in execute",
" cursor.execute(sql, params)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 67, in execute",
" return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 76, in _execute_with_wrappers",
" return executor(sql, params, many, context)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 84, in _execute",
" return self.cursor.execute(sql, params)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/utils.py\", line 89, in __exit__",
" raise dj_exc_value.with_traceback(traceback) from exc_value",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/utils.py\", line 82, in _execute",
" return self.cursor.execute(sql)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/django/db/backends/mysql/base.py\", line 71, in execute",
" return self.cursor.execute(query, args)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 206, in execute",
" res = self._query(query)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/cursors.py\", line 312, in _query",
" db.query(q)",
" File \"/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/MySQLdb/connections.py\", line 224, in query",
" _mysql.connection.query(self, query)",
"django.db.utils.OperationalError: (1170, \"BLOB/TEXT column 'digest' used in key specification without a key length\")"
],
"stdout":"Operations to perform:\n Apply all migrations: admin, auth, contenttypes, core, rpm, sessions\nRunning migrations:\n Applying admin.0001_initial... OK\n Applying admin.0002_logentry_remove_auto_add... OK\n Applying admin.0003_logentry_add_action_flag_choices... OK\n Applying core.0001_initial... OK\n Applying rpm.0001_initial...",
"stdout_lines":[
"Operations to perform:",
" Apply all migrations: admin, auth, contenttypes, core, rpm, sessions",
"Running migrations:",
" Applying admin.0001_initial... OK",
" Applying admin.0002_logentry_remove_auto_add... OK",
" Applying admin.0003_logentry_add_action_flag_choices... OK",
" Applying core.0001_initial... OK",
" Applying rpm.0001_initial..."
]
Added by dkliban@redhat.com over 5 years ago
Updated by dkliban@redhat.com over 5 years ago
- Status changed from NEW to MODIFIED
Applied in changeset ecd12cf6e92f6725b6bd754afc94efca188681e5.
Updated by ttereshc about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Problem: plugin is not compatible with MariaDB
Solution: make database schema copmatible with MariaDB
This patch switches TestFields to CharFields where an index is needed on that field.
fixes: #4909 https://pulp.plan.io/issues/4909