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>
106 lines
3.1 KiB
Transact-SQL
106 lines
3.1 KiB
Transact-SQL
SELECT
|
|
RTRIM([CUSTNMBR]) AS custnmbr,
|
|
RTRIM([CUSTNAME]) AS custname,
|
|
RTRIM([COUNTRY]) AS country,
|
|
RTRIM([STATE]) AS state,
|
|
RTRIM([CITY]) AS city,
|
|
RTRIM([USERDEF1]) AS userdef1,
|
|
RTRIM([RATETPID]) AS ratetpid,
|
|
RTRIM([PRCLEVEL]) AS prclevel,
|
|
RTRIM([SLPRSNID]) AS slprsnid,
|
|
RTRIM([CUSTCLAS]) AS custclas,
|
|
RTRIM([CPRCSTNM]) AS cprcstnm,
|
|
RTRIM([CNTCPRSN]) AS cntcprsn,
|
|
RTRIM([STMTNAME]) AS stmtname,
|
|
RTRIM([SHRTNAME]) AS shrtname,
|
|
RTRIM([ADRSCODE]) AS adrscode,
|
|
RTRIM([UPSZONE]) AS upszone,
|
|
RTRIM([SHIPMTHD]) AS shipmthd,
|
|
RTRIM([TAXSCHID]) AS taxschid,
|
|
RTRIM([ADDRESS1]) AS address1,
|
|
RTRIM([ADDRESS2]) AS address2,
|
|
RTRIM([ADDRESS3]) AS address3,
|
|
RTRIM([ZIP]) AS zip,
|
|
RTRIM([PHONE1]) AS phone1,
|
|
RTRIM([PHONE2]) AS phone2,
|
|
RTRIM([PHONE3]) AS phone3,
|
|
RTRIM([FAX]) AS fax,
|
|
RTRIM([PRBTADCD]) AS prbtadcd,
|
|
RTRIM([PRSTADCD]) AS prstadcd,
|
|
RTRIM([STADDRCD]) AS staddrcd,
|
|
RTRIM([CHEKBKID]) AS chekbkid,
|
|
RTRIM([PYMTRMID]) AS pymtrmid,
|
|
[CRLMTTYP] AS crlmttyp,
|
|
[CRLMTAMT] AS crlmtamt,
|
|
[CRLMTPER] AS crlmtper,
|
|
[CRLMTPAM] AS crlmtpam,
|
|
RTRIM([CURNCYID]) AS curncyid,
|
|
[CUSTDISC] AS custdisc,
|
|
[MINPYTYP] AS minpytyp,
|
|
[MINPYDLR] AS minpydlr,
|
|
[MINPYPCT] AS minpypct,
|
|
[FNCHATYP] AS fnchatyp,
|
|
[FNCHPCNT] AS fnchpcnt,
|
|
[FINCHDLR] AS finchdlr,
|
|
[MXWOFTYP] AS mxwoftyp,
|
|
[MXWROFAM] AS mxwrofam,
|
|
RTRIM([COMMENT1]) AS comment1,
|
|
RTRIM([COMMENT2]) AS comment2,
|
|
RTRIM([USERDEF2]) AS userdef2,
|
|
RTRIM([TAXEXMT1]) AS taxexmt1,
|
|
RTRIM([TAXEXMT2]) AS taxexmt2,
|
|
RTRIM([TXRGNNUM]) AS txrgnnum,
|
|
[BALNCTYP] AS balnctyp,
|
|
[STMTCYCL] AS stmtcycl,
|
|
RTRIM([BANKNAME]) AS bankname,
|
|
RTRIM([BNKBRNCH]) AS bnkbrnch,
|
|
RTRIM([SALSTERR]) AS salsterr,
|
|
[DEFCACTY] AS defcacty,
|
|
[RMCSHACC] AS rmcshacc,
|
|
[RMARACC] AS rmaracc,
|
|
[RMSLSACC] AS rmslsacc,
|
|
[RMIVACC] AS rmivacc,
|
|
[RMCOSACC] AS rmcosacc,
|
|
[RMTAKACC] AS rmtakacc,
|
|
[RMAVACC] AS rmavacc,
|
|
[RMFCGACC] AS rmfcgacc,
|
|
[RMWRACC] AS rmwracc,
|
|
[RMSORACC] AS rmsoracc,
|
|
[FRSTINDT] AS frstindt,
|
|
[INACTIVE] AS inactive,
|
|
[HOLD] AS hold,
|
|
RTRIM([CRCARDID]) AS crcardid,
|
|
RTRIM([CRCRDNUM]) AS crcrdnum,
|
|
[CCRDXPDT] AS ccrdxpdt,
|
|
[KPDSTHST] AS kpdsthst,
|
|
[KPCALHST] AS kpcalhst,
|
|
[KPERHIST] AS kperhist,
|
|
[KPTRXHST] AS kptrxhst,
|
|
[NOTEINDX] AS noteindx,
|
|
[CREATDDT] AS creatddt,
|
|
[MODIFDT] AS modifdt,
|
|
[Revalue_Customer] AS revalue_customer,
|
|
[Post_Results_To] AS post_results_to,
|
|
RTRIM([FINCHID]) AS finchid,
|
|
RTRIM([GOVCRPID]) AS govcrpid,
|
|
RTRIM([GOVINDID]) AS govindid,
|
|
[DISGRPER] AS disgrper,
|
|
[DUEGRPER] AS duegrper,
|
|
RTRIM([DOCFMTID]) AS docfmtid,
|
|
[Send_Email_Statements] AS send_email_statements,
|
|
[USERLANG] AS userlang,
|
|
RTRIM([GPSFOINTEGRATIONID]) AS gpsfointegrationid,
|
|
[INTEGRATIONSOURCE] AS integrationsource,
|
|
RTRIM([INTEGRATIONID]) AS integrationid,
|
|
[ORDERFULFILLDEFAULT] AS orderfulfilldefault,
|
|
[CUSTPRIORITY] AS custpriority,
|
|
RTRIM([CCode]) AS ccode,
|
|
RTRIM([DECLID]) AS declid,
|
|
[RMOvrpymtWrtoffAcctIdx] AS rmovrpymtwrtoffacctidx,
|
|
[SHIPCOMPLETE] AS shipcomplete,
|
|
[CBVAT] AS cbvat,
|
|
[INCLUDEINDP] AS includeindp,
|
|
[DEX_ROW_TS] AS dex_row_ts,
|
|
[DEX_ROW_ID] AS dex_row_id
|
|
FROM [GPSERVER].[CHG].[dbo].[RM00101]
|