# Example RelSpec job file. See docs/JOB_FILES.md for the full reference. # # cd examples/jobs # relspec job list # relspec job run build-schema --plan # relspec job run build-schema # relspec job run lint-schema # inspect, consuming build-json's output version: 1 # File-wide defaults. Individual jobs may override log_max_size / log_keep. defaults: log_max_size: 2MB log_keep: 5 jobs: build-schema: command: convert description: Merge the DBML sources and emit PostgreSQL DDL inputs: - path: schema/core.dbml format: dbml - path: schema/tenant.dbml format: dbml output: format: pgsql path: build/schema.sql overwrite: true options: flatten_schema: false logfile: .relspec/log/build-schema.log build-json: command: convert description: Also emit a JSON schema once build-schema succeeds depends_on: [build-schema] inputs: - path: schema/core.dbml format: dbml - path: schema/tenant.dbml format: dbml output: format: json path: build/schema.json overwrite: true migration-order: command: scripts-list description: Show the combined execution order across script directories script_dirs: - migrations/core - migrations/tenant logfile: .relspec/log/migration-order.log lint-schema: command: inspect description: Validate build-json's output against the built-in rules # No depends_on needed: the from_job input implies a dependency on build-json. inputs: - from_job: build-json report: format: markdown path: build/lint-report.md overwrite: true logfile: .relspec/log/lint-schema.log posts-only: command: split description: Extract just the posts table into its own DBML file inputs: - path: schema/core.dbml format: dbml - path: schema/tenant.dbml format: dbml select: tables: [posts] output: format: dbml path: build/posts.dbml overwrite: true