mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-28 20:04:32 +02:00
str, int, bytes aliases for column types, closes #606
This commit is contained in:
parent
9286c1ba43
commit
88bd372205
5 changed files with 32 additions and 3 deletions
|
|
@ -1157,7 +1157,7 @@ See :ref:`cli_add_column`.
|
|||
::
|
||||
|
||||
Usage: sqlite-utils add-column [OPTIONS] PATH TABLE COL_NAME
|
||||
[[integer|float|blob|text|INTEGER|FLOAT|BLOB|TEXT]]
|
||||
[[integer|int|float|text|str|blob|bytes]]
|
||||
|
||||
Add a column to the specified table
|
||||
|
||||
|
|
|
|||
|
|
@ -2310,7 +2310,14 @@ You can add a column using the ``add-column`` command:
|
|||
|
||||
sqlite-utils add-column mydb.db mytable nameofcolumn text
|
||||
|
||||
The last argument here is the type of the column to be created. You can use one of ``text``, ``integer``, ``float`` or ``blob``. If you leave it off, ``text`` will be used.
|
||||
The last argument here is the type of the column to be created. This can be one of:
|
||||
|
||||
- ``text`` or ``str``
|
||||
- ``integer`` or ``int``
|
||||
- ``float``
|
||||
- ``blob`` or ``bytes``
|
||||
|
||||
This argument is optional and defaults to ``text``.
|
||||
|
||||
You can add a column that is a foreign key reference to another table using the ``--fk`` option:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue