Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30579 closed New feature (wontfix)

Add management command to delete all tables.

Reported by: Victor Porton Owned by: nobody
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Please add management command to delete all tables from the DB.

Currently I need to drop the DB, create it again, and then configure (e.g. create PostgreSQL extensions) it again. That's very inconvenient.

Change History (5)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: invalid
Status: newclosed
Summary: Add management command to delete all tablesAdd management command to delete all tables.
Version: 2.2master

If you want to flush all data from tables you can use django-admin flush.

comment:2 by Victor Porton, 5 years ago

I know about flush command. It does not delete the tables themselves, as I need!

comment:3 by Mariusz Felisiak, 5 years ago

Resolution: invalidwontfix

I'm sorry but I don't think that your use case is so common that we should add a new management command to the Django. You can try to use connection.introspection.table_names() and prepare your own custom command.

comment:4 by Victor Porton, 5 years ago

I'm sorry but I don't think that your use case is so common that we should add a new management command to the Django.

It is very useful when some serious migration error happens during development.

Please add this functionality.

comment:5 by Mariusz Felisiak, 5 years ago

I wouldn't say that it is common. I cannot remember when I recreated database from scratch due to a "serious migration error". You can add this custom command in your own project. Please use one of support channels if you need any help with that.

Follow triaging guidelines with regards to wontfix tickets.

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