Skip to content

feat(OUT-4005): payout sync table schema + migration [1/4] - #273

Merged
SandipBajracharya merged 1 commit into
feature/payout-reconciliationfrom
OUT-4005-split-1
Aug 3, 2026
Merged

feat(OUT-4005): payout sync table schema + migration [1/4]#273
SandipBajracharya merged 1 commit into
feature/payout-reconciliationfrom
OUT-4005-split-1

Conversation

@SandipBajracharya

Copy link
Copy Markdown
Collaborator

Stack 1/4 — base: OUT-4012

Adds the qb_payout_sync table (schema + migration) that stores the payout payload so a failed reconciliation can be rebuilt on resync. Amounts are integer cents, matching line_items. Includes the schema round-trip test.

Part of the OUT-4005 payout-reconciliation stack:

  1. schema + migration ← this PR
  2. reconciliation service + deposit lookup
  3. webhook + resync wiring
  4. typecheck tooling + chore

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

OUT-4005

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quickbooks-sync (dev) Ready Ready Preview Jul 31, 2026 10:38am

Request Review

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

Adds persistent payout-reconciliation state and its database integration.

  • Creates the qb_payout_sync table, partial unique index, migration metadata, and Drizzle schema.
  • Exports the payout line-item type used by the JSONB column.
  • Registers the table in the shared schema and test cleanup helper.
  • Adds an integration test covering payout-row persistence and retrieval.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously missing PayoutLineItem export is now present and consumed by the payout schema.

Important Files Changed

Filename Overview
src/db/schema/qbPayoutSync.ts Defines the payout-sync table, typed JSONB payload, monetary and deposit fields, validation schemas, and active-row uniqueness constraint.
src/type/dto/webhook.dto.ts Extracts and exports the payout line-item schema and inferred type, resolving the previously reported missing type export.
src/db/migrations/20260729105911_add_qb_payout_sync_table.sql Creates the payout-sync table and its partial unique index consistently with the Drizzle schema.
test/integration/quickbooks/payoutResync/schema.test.ts Verifies that payout records and typed JSONB line items round-trip through the database.

Reviews (2): Last reviewed commit: "feat(OUT-4005): add qb_payout_sync table..." | Re-trigger Greptile

Comment thread src/db/schema/qbPayoutSync.ts
New table stores the payout payload so a failed reconciliation can be
rebuilt on resync. Amounts are integer cents, matching line_items.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SandipBajracharya
SandipBajracharya changed the base branch from OUT-4012 to feature/payout-reconciliation July 31, 2026 10:39
@SandipBajracharya

Copy link
Copy Markdown
Collaborator Author

@greptileai review PR again

@priosshrsth priosshrsth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SandipBajracharya
SandipBajracharya merged commit ce487c0 into feature/payout-reconciliation Aug 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants