Opened 7 years ago

Closed 7 years ago

#6765 closed (fixed)

Docs for 'Providing initial SQL data' misleading

Reported by: Michael Hipp <Michael@…> Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation for 'Providing initial SQL data' is misleading.
http://www.djangoproject.com/documentation/model-api/#providing-initial-sql-data

It says:
"Each SQL file, if given, is expected to contain valid SQL. The SQL files are piped directly into the database after all of the models’ table-creation statements have been executed."

This implies that any SQL is ok, as long as it is valid. And the SQL files are not "piped directly into the database", they are actually parsed and translated for different backends. The result is that only very simple SQL is allowed (mostly only value inserts). This needs to be clarified.

Change History (2)

comment:1 Changed 7 years ago by telenieko

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

(In [8373]) Fixed #6765: Changed docs/model-apit.txt to better indicate what's expected of initial SQL files.

Note: See TracTickets for help on using tickets.
Back to Top