2 ms·
Good point, I should add that to the docs. You can see the schema in a couple of ways: sqlite-utils memory blah.json "select sql from sqlite_master" Or
by simonw 5y ago
Good point, I should add that to the docs. You can see the schema in a couple of ways:
sqlite-utils memory blah.json "select sql from sqlite_master"
Or
sqlite-utils memory blah.json --dump
The second option will dump out both the SQL schema and the INSERT statements, so you probably want to | head that.
You've inspired me to add a --schema option which does the dump without also including the inserted rows. Issue here: https://github.com/simonw/sqlite-utils/issues/288 https://github.com/simonw/sqlite-utils/issues/288