drift
Check whether the live database has drifted from the recorded state, reporting the difference as a diff that answers “what has been done to this database outside of NSchema?”.
nschema driftnschema drift --detailed-exitcode # CI/monitoring: exit 2 if the database has driftedOptions
Section titled “Options”-s,--scope <name>— limit the check to specific namespaces. May be repeated.--detailed-exitcode— return a detailed exit code:0when there is no drift,2when the live database- has drifted (errors stay
1), so a monitoring job can gate on it. Without it,driftexits0and you read the diff it prints.
See Detecting drift for how to use this in monitoring.