drop-table and drop-view commands, closes #111

This commit is contained in:
Simon Willison 2020-05-10 17:44:21 -07:00
commit 4e9cb739c7
3 changed files with 120 additions and 0 deletions

View file

@ -401,6 +401,14 @@ You can specify foreign key relationships between the tables you are creating us
If a table with the same name already exists, you will get an error. You can choose to silently ignore this error with ``--ignore``, or you can replace the existing table with a new, empty table using ``--replace``.
.. _cli_drop_table:
Dropping tables
===============
You can drop a table using the ``drop-table`` command::
$ sqlite-utils drop-table mytable
.. _cli_create_view:
@ -416,6 +424,15 @@ You can create a view using the ``create-view`` command::
Use ``--replace`` to replace an existing view of the same name, and ``--ignore`` to do nothing if a view already exists.
.. _cli_drop_view:
Dropping views
==============
You can drop a view using the ``drop-view`` command::
$ sqlite-utils drop-view myview
.. _cli_add_column:
Adding columns