Django

Code

Ticket #304 (closed: duplicate)

Opened 3 years ago

Last modified 2 years ago

Changes to auth.LogEntry in changeset [469] breaks Oracle backend.

Reported by: Jason Huggins Assigned to: adrian
Milestone: Component: Database wrapper
Version: Keywords: oracle TextField CharField Long
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Changeset [469] added an additional "TextField?" objects to the LogEntry? model.

In the Oracle backend (#87), I mapped TextField? types in Django to the "Long" datatype in the db, because the Model documentaton suggests TextFields? should be used to store (potentially large) html content. If I used any other string datatype (like varchar2), the max length of the field would be 4000 characters/bytes. That isn't good. Yet, again, Oracle stinks compared to PostgreSQL, because Oracle only allows one "Long" field type per table.

If LogEntry?'s "object_id" needs to only hold small strings, and it is going to be less than 4000 characters, I'd suggest you change it to CharField?.

After changeset #469, I get this error in django-admin.py init: """ Error: The database couldn't be initialized. Here's the full exception: ORA-01754: a table may contain only one column of type LONG """

I've confirmed that changing LogEntry?'s object_id field to "CharField?" fixes the problem for Oracle.

Attachments

Change History

08/11/05 05:53:01 changed by hugo <gb@bofh.ms>

You might be able to use CLOBs instead of LONG. CLOB can be indexed just as TEXT in PostgreSQL. But the query interface for CLOBs is a bit weird, as they are only accessible thru the large object API and not as a direct field, IIRC.

04/23/06 17:27:40 changed by adrian

  • status changed from new to closed.
  • resolution set to duplicate.

Marking this as a duplicate of #87.


Add/Change #304 (Changes to auth.LogEntry in changeset [469] breaks Oracle backend.)




Change Properties
Action