db.schema and 'sqlite-utils schema' command, closes #268

This commit is contained in:
Simon Willison 2021-06-11 13:51:49 -07:00
commit 0d2e4f49f3
6 changed files with 90 additions and 2 deletions

View file

@ -348,6 +348,19 @@ It defaults to showing triggers for all tables. To see triggers for one or more
The command takes the same format options as the ``tables`` and ``views`` commands.
.. _cli_schema:
Showing the schema
==================
The ``sqlite-utils schema`` command shows the full SQL schema for the database::
$ sqlite-utils schema dogs.db
CREATE TABLE "dogs" (
[id] INTEGER PRIMARY KEY,
[name] TEXT
);
.. _cli_analyze_tables:
Analyzing tables