format
Reformats your .sql DDL files to a canonical layout.
nschema format # format every .sql file under the current directorynschema format ./schemas/users.sql # format a single filenschema format --check # CI: fail if anything is unformattedcat users.sql | nschema format - # format stdin to stdoutnschema format [path] rewrites a single .sql file, or every .sql file found recursively under a directory, in place,
and lists the files it changed. path defaults to the current directory.
Options
Section titled “Options”--check— write nothing; list the files that need formatting and exit2if any do (errors exit1). For CI.nschema format -— read DDL from stdin and write the formatted result to stdout, for editor integration.