Skip to content

scaffold

Scaffold a simple project in the current directory, to get a new project going.

Terminal window
nschema scaffold

This writes:

Edit those to point at your database and describe the schema you want, then plan and apply.

scaffold resolves the latest plugin version compatible with this CLI and pins it in the generated versionattribute, so the project is reproducible from the moment it’s created.

  • -f, --force — scaffold even if the directory is not empty. Without it, scaffold refuses to run in a non-empty directory so it can’t clobber existing files.
  • --provider <postgres|sqlite|sqlserver> — the database provider to scaffold for. Defaults to postgres.
  • --backend <file|s3> — the state backend to scaffold for. Defaults to file.

The .NET SDK and network access to your NuGet feed: scaffold resolves and restores the chosen plugin (shelling out to dotnet) to read its template and pin its version. The built-in file backend needs no plugin.