synopsis:Fully resets your database by running DROP DATABASE and CREATE DATABASE

Django command that resets your Django database, removing all data from all tables. This allows you to run all migrations again.

By default the command will prompt you to confirm that all data will be deleted. This can be turned off with the --noinput-argument.

Supported engines

The command detects whether you’re using a SQLite, MySQL, or Postgres database by looking up your Django database engine in the following lists.


If the engine you’re using is not listed above, check the optional settings section below.

Example Usage

# Reset the DB so that it contains no data and migrations can be run again
$ ./ reset_db mybucket
# Don't ask for a confirmation before doing the reset
$ ./ reset_db --noinput
# Use a different user and password than the one from
$ ./ reset_db --user db_root --password H4rd2Guess

Optional settings

It is possible to use a Django DB engine not in the lists above – to do that add the approriate setting as shown below to your Django settings file:

DJANGO_EXTENSIONS_RESET_DB_SQLITE_ENGINES = ['your_custom_sqlite_engine']
DJANGO_EXTENSIONS_RESET_DB_MYSQL_ENGINES = ['your_custom_mysql_engine']