mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-10 18:44:20 +02:00
sqlite-utils rename-table command, refs #565
This commit is contained in:
parent
82e8cd3667
commit
18f190e283
4 changed files with 93 additions and 0 deletions
13
docs/cli.rst
13
docs/cli.rst
|
|
@ -1936,6 +1936,19 @@ If a table with the same name already exists, you will get an error. You can cho
|
|||
|
||||
You can also pass ``--transform`` to transform the existing table to match the new schema. See :ref:`python_api_explicit_create` in the Python library documentation for details of how this option works.
|
||||
|
||||
.. _cli_renaming_tables:
|
||||
|
||||
Renaming a table
|
||||
================
|
||||
|
||||
Yo ucan rename a table using the ``rename-table`` command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sqlite-utils rename-table mydb.db oldname newname
|
||||
|
||||
Pass ``--ignore`` to ignore any errors caused by the table not existing, or the new name already being in use.
|
||||
|
||||
.. _cli_duplicate_table:
|
||||
|
||||
Duplicating tables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue