[Django] #23401: "django_admin_log"."object_id" has wrong type in djangoproject database

14 views
Skip to first unread message

Django

unread,
Sep 2, 2014, 10:08:17 PM9/2/14
to django-...@googlegroups.com
#23401: "django_admin_log"."object_id" has wrong type in djangoproject database
-----------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: *.djangoproject.com | Version:
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------------+------------------------
In the production database, `"django_admin_log"."object_id"` has type
`integer` instead of `text` (`LogEntry.object_id` is a `TextField` and has
been since at least magic removal; I guess it was `IntegerField` before
and never properly migrated). Can we manually run a query to change the
type?

Discovered this today when James couldn't create the release objects in
the admin. Checking the traceback it was `DataError: invalid input syntax
for integer: "1.4.15"`

Traced it down and had to roll back this in the meantime:
https://github.com/django/djangoproject.com/commit/016c7042134bde30cf5d2b67b5bbf723b4d7bc15

--
Ticket URL: <https://code.djangoproject.com/ticket/23401>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 4, 2014, 9:17:23 AM9/4/14
to django-...@googlegroups.com
#23401: "django_admin_log"."object_id" has wrong type in djangoproject database
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: *.djangoproject.com | Version:
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => fixed


Comment:

Ran this query: `ALTER TABLE django_admin_log ALTER COLUMN object_id TYPE
text;`

--
Ticket URL: <https://code.djangoproject.com/ticket/23401#comment:1>

Django

unread,
Sep 4, 2014, 9:19:47 AM9/4/14
to django-...@googlegroups.com
#23401: "django_admin_log"."object_id" has wrong type in djangoproject database
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: closed
Component: *.djangoproject.com | Version:

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In
[changeset:"a5965f1e0a2c3609fb9612cb31b2b71cf1bff64f/djangoproject.com"]:
{{{
#!CommitTicketReference repository="djangoproject.com"
revision="a5965f1e0a2c3609fb9612cb31b2b71cf1bff64f"
Removed hack to disable admin logging for releases app; refs #23401.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23401#comment:2>

Reply all
Reply to author
Forward
0 new messages