mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 09:54:31 +02:00
drop-table and drop-view commands, closes #111
This commit is contained in:
parent
396bee9236
commit
4e9cb739c7
3 changed files with 120 additions and 0 deletions
17
docs/cli.rst
17
docs/cli.rst
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue