Improve CLI help for drop-table and drop-view, refs #450

This commit is contained in:
Simon Willison 2022-07-15 15:09:07 -07:00
commit 9dd4cf891d
2 changed files with 4 additions and 4 deletions

View file

@ -1206,7 +1206,7 @@ See :ref:`cli_drop_table`.
sqlite-utils drop-table chickens.db chickens
Options:
--ignore
--ignore If table does not exist, do nothing
--load-extension TEXT SQLite extensions to load
-h, --help Show this message and exit.
@ -1250,7 +1250,7 @@ See :ref:`cli_drop_view`.
sqlite-utils drop-view chickens.db heavy_chickens
Options:
--ignore
--ignore If view does not exist, do nothing
--load-extension TEXT SQLite extensions to load
-h, --help Show this message and exit.

View file

@ -1493,7 +1493,7 @@ def duplicate(path, table, new_table, load_extension):
required=True,
)
@click.argument("table")
@click.option("--ignore", is_flag=True)
@click.option("--ignore", is_flag=True, help="If table does not exist, do nothing")
@load_extension_option
def drop_table(path, table, ignore, load_extension):
"""Drop the specified table
@ -1563,7 +1563,7 @@ def create_view(path, view, select, ignore, replace, load_extension):
required=True,
)
@click.argument("view")
@click.option("--ignore", is_flag=True)
@click.option("--ignore", is_flag=True, help="If view does not exist, do nothing")
@load_extension_option
def drop_view(path, view, ignore, load_extension):
"""Drop the specified view