pipekit/config/modules/moldmast.sql
Paul Trowbridge dd9f89f4b5 feat: version-control pipeline definitions via export/apply
Add `pipekit export` / `pipekit apply` (pipekit/config_io.py) to serialise the
DB's config — drivers, connections, modules (+ columns, watermarks, hooks),
groups, schedules — to a git-trackable text tree under config/, and rehydrate
it. SQLite stays runtime state; definitions become diffable/reviewable/
revertible.

- config only: run_log/group_run/settings and per-run state columns excluded
- name-keyed refs (portable across databases); source_query in .sql sidecars;
  columns as real JSON arrays for line-by-line diffs
- newline-normalised so CRLF-vs-LF is never a spurious change
- apply is create/update by name; child collections fully synced; top-level
  deletes gated behind --prune; --dry-run prints the plan
- round-trip is identity (export -> apply --dry-run == nothing to do)

Commits the current config/ as the first baseline, capturing the freshly
populated columns_json for rm00101/rm00301/iv00101. Documented in SPEC.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 10:56:55 -04:00

69 lines
1.8 KiB
SQL

SELECT
RTRIM(MMMOLD) AS mmmold,
RTRIM(MMSDES) AS mmsdes,
RTRIM(MMLDES) AS mmldes,
MMMDCIU AS mmmdciu,
MMMLUUU AS mmmluuu,
MMODU AS mmodu,
MMIDU AS mmidu,
MMHTU AS mmhtu,
MMOWIU AS mmowiu,
MMOLIU AS mmoliu,
MMIWIU AS mmiwiu,
MMILIU AS mmiliu,
RTRIM(MMPSU) AS mmpsu,
MMPHU AS mmphu,
RTRIM(MMMDUOMU) AS mmmduomu,
RTRIM(MMMLUOMU) AS mmmluomu,
RTRIM(MMODUOMU) AS mmoduomu,
RTRIM(MMIDUOMU) AS mmiduomu,
RTRIM(MMHUOMU) AS mmhuomu,
RTRIM(MMOLWOMU) AS mmolwomu,
RTRIM(MMOLUOMU) AS mmoluomu,
RTRIM(MMIWUOMU) AS mmiwuomu,
RTRIM(MMILUOMU) AS mmiluomu,
RTRIM(MMPHUOMU) AS mmphuomu,
MMMDCIM AS mmmdcim,
MMMLUUM AS mmmluum,
MMODM AS mmodm,
MMIDM AS mmidm,
MMHTM AS mmhtm,
MMOWIM AS mmowim,
MMOLIM AS mmolim,
MMIWIM AS mmiwim,
MMILIM AS mmilim,
RTRIM(MMPSM) AS mmpsm,
MMPHM AS mmphm,
RTRIM(MMMDUOMM) AS mmmduomm,
RTRIM(MMMLUOMM) AS mmmluomm,
RTRIM(MMODUOMM) AS mmoduomm,
RTRIM(MMIDUOMM) AS mmiduomm,
RTRIM(MMHUOMM) AS mmhuomm,
RTRIM(MMOLWOMM) AS mmolwomm,
RTRIM(MMOLUOMM) AS mmoluomm,
RTRIM(MMIWUOMM) AS mmiwuomm,
RTRIM(MMILUOMM) AS mmiluomm,
RTRIM(MMPHUOMM) AS mmphuomm,
RTRIM(MMFEATURE) AS mmfeature,
RTRIM(MMFAMILY) AS mmfamily,
RTRIM(MMIMGURL) AS mmimgurl,
RTRIM(MMHEADER) AS mmheader,
RTRIM(MMBIGGROUP) AS mmbiggroup,
RTRIM(MMSPONSOR) AS mmsponsor,
RTRIM(MMCOMPAT) AS mmcompat,
MMHSORT AS mmhsort,
MMDSORT AS mmdsort,
RTRIM(MMCCFG) AS mmccfg,
RTRIM(MMFORMAT) AS mmformat,
RTRIM(MMFORM_UOM) AS mmform_uom,
RTRIM(MMFUNC) AS mmfunc,
RTRIM(MMPRTGRP) AS mmprtgrp,
RTRIM(MMPRICEG) AS mmpriceg,
RTRIM(MMSHAPE) AS mmshape,
RTRIM(MMTSLT) AS mmtslt,
RTRIM(MMPLNT) AS mmplnt,
RTRIM(MMREAS) AS mmreas,
RTRIM(MMGRPSTAT) AS mmgrpstat,
RTRIM(MMPRODGRP) AS mmprodgrp
FROM LGPGM.MOLDMAST