Troubleshooting
A table or column "not found" that does exist
- Run
sqlsift schemawith the same options (or the samesqlsift.toml) to see what sqlsift loaded. If the table is missing, the statement that creates it was probably skipped; skipped statements are listed as warnings on stderr. - Check the order of your schema files. With
--schema-dir, files are applied in file-name order, so a migration named10_add_column.sqlruns before2_create_table.sql. Zero-pad numeric prefixes. - Check the dialect. A MySQL schema parsed as PostgreSQL may be partly skipped.
- In PostgreSQL, a table in a schema other than
publicmust be schema-qualified (analytics.daily_signups) unless aSET search_pathin the file puts its schema on the path, as in the database. See Schemas and qualified names.
"Pattern matched no files" (exit code 2)
Glob patterns are relative to the current directory on the command line, and to the directory of sqlsift.toml inside it. Quote patterns containing ** so your shell doesn't expand them first.
Seeing what sqlsift is doing
-v logs the files and configuration sqlsift uses to stderr; -vv adds debug output, such as which files were ignored.
Valid SQL reported as an error
That's a bug. Suppress it for now with a sqlsift:disable comment, and please open an issue with a minimal schema and query. The playground is handy for cutting the example down.