--not-null-default and not_null_default=, refs #24

This commit is contained in:
Simon Willison 2019-06-12 18:35:02 -07:00
commit 2fed87da6e
7 changed files with 87 additions and 16 deletions

View file

@ -280,6 +280,10 @@ You can explicitly specify the column you wish to reference using ``--fk-col``::
$ sqlite-utils add-column mydb.db dogs species_id --fk species --fk-col ref
You can set a ``NOT NULL DEFAULT 'x'`` constraint on the new column using ``--not-null-default``::
$ sqlite-utils add-column mydb.db dogs friends_count integer --not-null-default 0
.. _cli_add_column_alter:
Adding columns automatically on insert/update