Opened 9 years ago

Closed 9 years ago

#23136 closed Cleanup/optimization (fixed)

sqlclear does not notify operator that there is nothing to clear

Reported by: jackiekazil Owned by: Gabriel Muñumel
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

I tried passing sqlclear to dbshell and came up with this error, which was non-descript.

$ django-admin.py sqlclear foia_core | django-admin.py dbshell
ERROR:  syntax error at or near "/"
LINE 1: /Users/jacquelinekazil/Projects/code/foia/foia-core/foia_cor...

Then I tried running each command separately. When I ran sqlclear, nothing appeared to happened.

$ django-admin.py sqlclear foia_core
$

This is confusing to user if they are expecting something to happen. There should be output to tell the user what happened.
Example: Foo app has no tables in the database.

Change History (10)

comment:1 Changed 9 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

Sounds reasonable, and shouldn't be too hard to implement either. Might be worth checking if other sql* commands are also affected as well.

comment:2 Changed 9 years ago by Tim Graham

I believe most of the sql* commands besides sqlmigrate are headed down the deprecation path, so this might not be worth it.

comment:3 Changed 9 years ago by Gabriel Muñumel

I´d like to implement this if there is not objection.

comment:4 Changed 9 years ago by Gabriel Muñumel

Owner: changed from nobody to Gabriel Muñumel
Status: newassigned

comment:6 Changed 9 years ago by Tim Graham

Couple of issues:

  • New features are going to master only (not 1.6).
  • I only see a test in your commit, not the functional changes (and it isn't an actual pull request).

comment:7 Changed 9 years ago by Gabriel Muñumel

comment:8 Changed 9 years ago by Tim Graham

Has patch: set
Patch needs improvement: set
Version: 1.6master

comment:9 Changed 9 years ago by Gabriel Muñumel

I made the changes Timo

comment:10 Changed 9 years ago by Tim Graham

Resolution: fixed
Status: assignedclosed

In 3e241313a4cea5dbf53068181408a7c34f00c9ca:

Fixed #23136 -- Added a message when sqlclear does nothing

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