From 5564d0f2ee9b33d30471eafef30efa71c7c47459 Mon Sep 17 00:00:00 2001 From: Adam Chainz Date: Wed, 1 Apr 2015 22:33:27 +0100 Subject: Fixed #24560 -- Added a --dry-run mode to the createcachetable command. --- docs/ref/django-admin.txt | 7 +++++++ docs/releases/1.9.txt | 3 +++ docs/topics/cache.txt | 3 +++ 3 files changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 3515c615e7..2b68f6575d 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -189,6 +189,13 @@ The :djadminopt:`--database` option can be used to specify the database onto which the cache table will be installed, but since this information is pulled from your settings by default, it's typically not needed. +The :djadminopt:`--dry-run` option will print the SQL that would be run without +actually running it, so you can customize it or use the migrations framework. + +.. versionchanged:: 1.9 + + The ``--dry-run`` option was added. + dbshell ------- diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index cd124bf602..d89354ea6a 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -166,6 +166,9 @@ Management Commands * The :djadmin:`dumpdata` command output is now deterministically ordered. +* The :djadmin:`createcachetable` command now has a ``--dry-run`` flag to + print out the SQL rather than execute it. + Models ^^^^^^ diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index ec973a5008..1a21eab164 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -206,6 +206,9 @@ If you are using multiple databases, :djadmin:`createcachetable` observes the Like :djadmin:`migrate`, :djadmin:`createcachetable` won't touch an existing table. It will only create missing tables. +To print the SQL that would be run, rather than run it, use the +:djadminopt:`--dry-run` option. + Multiple databases ~~~~~~~~~~~~~~~~~~ -- cgit v1.3