Working with schemas
Deploy a schema safely
On this page
Deployment executes generated SQL against a database. Unlike validation and rendering, it needs an installed and registered ADO.NET provider.
Review a dry run
Set DUBURL_DATABASE_URL in your environment to the target connection URL. Select it by environment-variable name so credentials do not appear in process arguments:
duburl schema deploy schema.yaml --connection-env DUBURL_DATABASE_URL --dry-run
--dry-run renders the SQL without opening a connection. Check the target dialect, identifiers, and requested changes before continuing.
Apply the schema
duburl schema deploy schema.yaml --connection-env DUBURL_DATABASE_URL
Dropping existing objects requires --drop-existing; non-interactive execution additionally requires --yes. Use destructive options only when replacing those objects is intended.
Embed or automate deployment
- Use the schema application API from .NET.
- Use the automation guide from CI or a script.
- Use the JSON-RPC worker from a persistent client. Worker live deployment is disabled by default and has its own opt-in policy.