#24362: Migration test failure on Oracle
-------------------------------------------+------------------------
Reporter: shaib | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Release blocker | Keywords: oracle
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
On CI, reporoduces also on my laptop:
{{{#!python
======================================================================
ERROR [0.000s]: test_run_python_related_assignment
(migrations.test_operations.OperationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File ".../tests/migrations/test_operations.py", line 1714, in
test_run_python_related_assignment
create_old_man.database_forwards("test_books", editor, project_state,
new_state)
File ".../django/db/migrations/operations/special.py", line 179, in
database_forwards
self.code(from_state.apps, schema_editor)
File ".../tests/migrations/test_operations.py", line 1671, in
inner_method
author = Author.objects.create(name="Hemingway")
File ".../django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File ".../django/db/models/query.py", line 401, in create
obj.save(force_insert=True, using=self.db)
File ".../django/db/models/base.py", line 676, in save
force_update=force_update, update_fields=update_fields)
File ".../django/db/models/base.py", line 704, in save_base
updated = self._save_table(raw, cls, force_insert, force_update,
using, update_fields)
File ".../django/db/models/base.py", line 788, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk,
raw)
File ".../django/db/models/base.py", line 827, in _do_insert
using=using, raw=raw)
File ".../django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File ".../django/db/models/query.py", line 1026, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File ".../django/db/models/sql/compiler.py", line 963, in execute_sql
cursor.execute(sql, params)
File ".../django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File ".../django/db/utils.py", line 92, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File ".../django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File ".../django/db/backends/oracle/base.py", line 478, in execute
return self.cursor.execute(query, self._param_generator(params))
IntegrityError: ORA-01400: cannot insert NULL into
("D_DJANGOORACLE_27"."TEST_AUTHORS_AUTHOR"."ID")
}}}
Bisecting leads to the commit that added the test; it was added (failing)
for #24282, and the failure was later fixed.
The failure on Oracle is unrelated to the problem reported on the ticket,
but since the solution (b29f3b51204d53c1c8745966476543d068c173a2) involved
a rewrite of model reloading, it may be related.
--
Ticket URL: <https://code.djangoproject.com/ticket/24362>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.2305301e9bdac55635c0905a26e54dfb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.