mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Removed support for custom SQL per deprecation timeline.
This commit is contained in:
parent
a420f83e7d
commit
4aa089a9a9
26 changed files with 10 additions and 368 deletions
|
|
@ -989,9 +989,6 @@ sqlall <app_label app_label ...>
|
|||
|
||||
Prints the CREATE TABLE and initial-data SQL statements for the given app name(s).
|
||||
|
||||
Refer to the description of :djadmin:`sqlcustom` for an explanation of how to
|
||||
specify initial data.
|
||||
|
||||
The :djadminopt:`--database` option can be used to specify the database for
|
||||
which to print the SQL.
|
||||
|
||||
|
|
@ -1012,30 +1009,6 @@ Prints the DROP TABLE SQL statements for the given app name(s).
|
|||
The :djadminopt:`--database` option can be used to specify the database for
|
||||
which to print the SQL.
|
||||
|
||||
sqlcustom <app_label app_label ...>
|
||||
-----------------------------------
|
||||
|
||||
.. django-admin:: sqlcustom
|
||||
|
||||
Prints the custom SQL statements for the given app name(s).
|
||||
|
||||
For each model in each specified app, this command looks for the file
|
||||
``<app_label>/sql/<modelname>.sql``, where ``<app_label>`` is the given app
|
||||
name and ``<modelname>`` is the model's name in lowercase. For example, if you
|
||||
have an app ``news`` that includes a ``Story`` model, ``sqlcustom`` will
|
||||
attempt to read a file ``news/sql/story.sql`` and append it to the output of
|
||||
this command.
|
||||
|
||||
Each of the SQL files, 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. Use this SQL hook to make any
|
||||
table modifications, or insert any SQL functions into the database.
|
||||
|
||||
Note that the order in which the SQL files are processed is undefined.
|
||||
|
||||
The :djadminopt:`--database` option can be used to specify the database for
|
||||
which to print the SQL.
|
||||
|
||||
sqldropindexes <app_label app_label ...>
|
||||
----------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue