Implements the remaining items from issue #20:
- version is now forward-permissive: any value >= 1 is accepted; a
newer-than-known version loads best-effort (unknown fields ignored,
warning printed) instead of hard-failing on "must be 1"
- from_job input reference: `inputs: [{ from_job: <job> }]` resolves to
that job's single-file output + format and implies a dependency edge;
combined depends_on + from_job graph gets topological ordering and
cycle detection
- logfile size-rotation, on by default (5MB, keep 3), overridable per
job (log_max_size / log_keep) or file-wide via a top-level defaults block
- new commands: split (schema/table subsetting via select:), inspect
(rule validation -> markdown/json report, fails job on enforced-rule
errors), diff (compare exactly two schemas, never fails), scripts-exec
(run SQL script dirs against a live PostgreSQL database)
- atomic single-file output/report writes (temp file + rename)
- symlink-escape hardening in SafeJoin via EvalSymlinks preflight
Updates docs/JOB_FILES.md and examples/jobs/relspec.yml accordingly.
Bun's pgdialect scans/appends native slices directly, so array columns
(text[], integer[], uuid[], ...) always generate as plain []string,
[]int32, etc. with an explicit "array" bun tag, regardless of --types
(sqltypes/stdlib/baselib). The SqlXxxArray wrapper types are no longer
used for Bun array columns (gorm is unaffected and keeps using them).
Adds --array-nullable pointer_slice to represent nullable array columns
as *[]T instead of []T, so callers can distinguish SQL NULL (nil) from
'{}' (pointer to an empty slice). Verified end-to-end against a live
PostgreSQL instance for NULL/{}/populated arrays in every --types mode.
Closes#13
* change default nullable type from resolvespec to baselib
* update type mappings in tests to reflect new nullable types
* adjust comments for clarity on nullable type options
* Introduce ContinueOnError option to WriterOptions
* Update writer functions to support continue-on-error behavior
* Modify migration and database writing to handle continue-on-error
* Fix pgsql reader double-quoting defaults: normalizePostgresDefault strips
surrounding SQL string literal quotes from column_default before storing,
matching the convention used by every other reader.
* Add NullableTypes field to WriterOptions with NullableTypeResolveSpec
(default) and NullableTypeStdlib constants.
* Both bun and gorm TypeMappers now accept a typeStyle parameter. stdlib
mode produces sql.NullString/NullInt32/NullTime etc. for nullable scalars,
plain Go slices for arrays, and time.Time for NOT NULL timestamps. Default
resolvespec behaviour is unchanged.
* Add --types flag to convert and split commands.
* Update bun/README.md and gorm/README.md with side-by-side generated code
examples, updated type mapping tables, and Writer Options documentation.
* Introduce `--flatten-schema` flag to convert, merge, and split commands.
* Modify database writing functions to support flattened schema names.
* Update template functions to handle schema.table naming convention.
* Enhance PostgreSQL writer to utilize flattened schema in generated SQL.
* Update tests to ensure compatibility with new flattening feature.
* Dependencies updated for improved functionality.
- Introduce 'split' command to extract selected tables and schemas.
- Supports various input and output formats.
- Allows filtering of schemas and tables during extraction.