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>
135 lines
4.1 KiB
Transact-SQL
135 lines
4.1 KiB
Transact-SQL
SELECT
|
|
[SOPTYPE] AS [soptype],
|
|
RTRIM([SOPNUMBE]) AS [sopnumbe],
|
|
[LNITMSEQ] AS [lnitmseq],
|
|
[CMPNTSEQ] AS [cmpntseq],
|
|
RTRIM([ITEMNMBR]) AS [itemnmbr],
|
|
RTRIM([ITEMDESC]) AS [itemdesc],
|
|
[NONINVEN] AS [noninven],
|
|
[DROPSHIP] AS [dropship],
|
|
RTRIM([UOFM]) AS [uofm],
|
|
RTRIM([LOCNCODE]) AS [locncode],
|
|
[UNITCOST] AS [unitcost],
|
|
[ORUNTCST] AS [oruntcst],
|
|
[UNITPRCE] AS [unitprce],
|
|
[ORUNTPRC] AS [oruntprc],
|
|
[XTNDPRCE] AS [xtndprce],
|
|
[OXTNDPRC] AS [oxtndprc],
|
|
[REMPRICE] AS [remprice],
|
|
[OREPRICE] AS [oreprice],
|
|
[EXTDCOST] AS [extdcost],
|
|
[OREXTCST] AS [orextcst],
|
|
[MRKDNAMT] AS [mrkdnamt],
|
|
[ORMRKDAM] AS [ormrkdam],
|
|
[MRKDNPCT] AS [mrkdnpct],
|
|
[MRKDNTYP] AS [mrkdntyp],
|
|
[INVINDX] AS [invindx],
|
|
[CSLSINDX] AS [cslsindx],
|
|
[SLSINDX] AS [slsindx],
|
|
[MKDNINDX] AS [mkdnindx],
|
|
[RTNSINDX] AS [rtnsindx],
|
|
[INUSINDX] AS [inusindx],
|
|
[INSRINDX] AS [insrindx],
|
|
[DMGDINDX] AS [dmgdindx],
|
|
RTRIM([ITMTSHID]) AS [itmtshid],
|
|
[IVITMTXB] AS [ivitmtxb],
|
|
[BKTSLSAM] AS [bktslsam],
|
|
[ORBKTSLS] AS [orbktsls],
|
|
[TAXAMNT] AS [taxamnt],
|
|
[ORTAXAMT] AS [ortaxamt],
|
|
[TXBTXAMT] AS [txbtxamt],
|
|
[OTAXTAMT] AS [otaxtamt],
|
|
[BSIVCTTL] AS [bsivcttl],
|
|
[TRDISAMT] AS [trdisamt],
|
|
[ORTDISAM] AS [ortdisam],
|
|
[DISCSALE] AS [discsale],
|
|
[ORDAVSLS] AS [ordavsls],
|
|
[QUANTITY] AS [quantity],
|
|
[ATYALLOC] AS [atyalloc],
|
|
[QTYINSVC] AS [qtyinsvc],
|
|
[QTYINUSE] AS [qtyinuse],
|
|
[QTYDMGED] AS [qtydmged],
|
|
[QTYRTRND] AS [qtyrtrnd],
|
|
[QTYONHND] AS [qtyonhnd],
|
|
[QTYCANCE] AS [qtycance],
|
|
[QTYCANOT] AS [qtycanot],
|
|
[QTYONPO] AS [qtyonpo],
|
|
[QTYORDER] AS [qtyorder],
|
|
[QTYPRBAC] AS [qtyprbac],
|
|
[QTYPRBOO] AS [qtyprboo],
|
|
[QTYPRINV] AS [qtyprinv],
|
|
[QTYPRORD] AS [qtyprord],
|
|
[QTYPRVRECVD] AS [qtyprvrecvd],
|
|
[QTYRECVD] AS [qtyrecvd],
|
|
[QTYREMAI] AS [qtyremai],
|
|
[QTYREMBO] AS [qtyrembo],
|
|
[QTYTBAOR] AS [qtytbaor],
|
|
[QTYTOINV] AS [qtytoinv],
|
|
[QTYTORDR] AS [qtytordr],
|
|
[QTYFULFI] AS [qtyfulfi],
|
|
[QTYSLCTD] AS [qtyslctd],
|
|
[QTYBSUOM] AS [qtybsuom],
|
|
[EXTQTYAL] AS [extqtyal],
|
|
[EXTQTYSEL] AS [extqtysel],
|
|
[ReqShipDate] AS [reqshipdate],
|
|
[FUFILDAT] AS [fufildat],
|
|
[ACTLSHIP] AS [actlship],
|
|
RTRIM([SHIPMTHD]) AS [shipmthd],
|
|
RTRIM([SALSTERR]) AS [salsterr],
|
|
RTRIM([SLPRSNID]) AS [slprsnid],
|
|
RTRIM([PRCLEVEL]) AS [prclevel],
|
|
RTRIM([COMMNTID]) AS [commntid],
|
|
[BRKFLD1] AS [brkfld1],
|
|
[BRKFLD2] AS [brkfld2],
|
|
[BRKFLD3] AS [brkfld3],
|
|
[CURRNIDX] AS [currnidx],
|
|
RTRIM([TRXSORCE]) AS [trxsorce],
|
|
[SOPLNERR] AS [soplnerr],
|
|
[ORGSEQNM] AS [orgseqnm],
|
|
RTRIM([ITEMCODE]) AS [itemcode],
|
|
[PURCHSTAT] AS [purchstat],
|
|
[DECPLQTY] AS [decplqty],
|
|
[DECPLCUR] AS [decplcur],
|
|
[ODECPLCU] AS [odecplcu],
|
|
[QTYTOSHP] AS [qtytoshp],
|
|
[XFRSHDOC] AS [xfrshdoc],
|
|
[EXCEPTIONALDEMAND] AS [exceptionaldemand],
|
|
RTRIM([TAXSCHID]) AS [taxschid],
|
|
[TXSCHSRC] AS [txschsrc],
|
|
RTRIM([PRSTADCD]) AS [prstadcd],
|
|
RTRIM([ShipToName]) AS [shiptoname],
|
|
RTRIM([CNTCPRSN]) AS [cntcprsn],
|
|
RTRIM([ADDRESS1]) AS [address1],
|
|
RTRIM([ADDRESS2]) AS [address2],
|
|
RTRIM([ADDRESS3]) AS [address3],
|
|
RTRIM([CITY]) AS [city],
|
|
RTRIM([STATE]) AS [state],
|
|
RTRIM([ZIPCODE]) AS [zipcode],
|
|
RTRIM([CCode]) AS [ccode],
|
|
RTRIM([COUNTRY]) AS [country],
|
|
RTRIM([PHONE1]) AS [phone1],
|
|
RTRIM([PHONE2]) AS [phone2],
|
|
RTRIM([PHONE3]) AS [phone3],
|
|
RTRIM([FAXNUMBR]) AS [faxnumbr],
|
|
[Flags] AS [flags],
|
|
[BackoutTradeDisc] AS [backouttradedisc],
|
|
[OrigBackoutTradeDisc] AS [origbackouttradedisc],
|
|
RTRIM([GPSFOINTEGRATIONID]) AS [gpsfointegrationid],
|
|
[INTEGRATIONSOURCE] AS [integrationsource],
|
|
RTRIM([INTEGRATIONID]) AS [integrationid],
|
|
RTRIM([CONTNBR]) AS [contnbr],
|
|
[CONTLNSEQNBR] AS [contlnseqnbr],
|
|
[CONTSTARTDTE] AS [contstartdte],
|
|
[CONTENDDTE] AS [contenddte],
|
|
RTRIM([CONTITEMNBR]) AS [contitemnbr],
|
|
RTRIM([CONTSERIALNBR]) AS [contserialnbr],
|
|
[BULKPICKPRNT] AS [bulkpickprnt],
|
|
[INDPICKPRNT] AS [indpickprnt],
|
|
[ISLINEINTRA] AS [islineintra],
|
|
RTRIM([SOFULFILLMENTBIN]) AS [sofulfillmentbin],
|
|
[MULTIPLEBINS] AS [multiplebins],
|
|
[Print_Phone_NumberGB] AS [print_phone_numbergb],
|
|
[DEX_ROW_TS] AS [dex_row_ts],
|
|
[DEX_ROW_ID] AS [dex_row_id]
|
|
FROM [GPSERVER].[CHG].[dbo].[SOP10200]
|