Skip to content

feat(database): add JobStatements and jobs schema - #3340

Open
adlerhurst wants to merge 3 commits into
cursor/jobs-slice-d-design-ee5efrom
cursor/jobs-slice-1-statements-ee5e
Open

adlerhurst wants to merge 3 commits into
cursor/jobs-slice-d-design-ee5efrom
cursor/jobs-slice-1-statements-ee5e

Conversation

@adlerhurst

@adlerhurst adlerhurst commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

TL;DR

3 of 6 (bases on #3338). Storage layer for ADR 065: jobs + job_schedules, JobStatements on AllStatements, dialect migrations, stmttest.

Reviewer map

Core Mechanical
apps/api/internal/storage/dialect/*/jobs.go migrations sqlite 055 / postgres 068 / spanner 073
apps/api/internal/service/statement.go (JobStatements) regenerated service.mock.go
apps/api/internal/storage/stmttest/jobs_test.go changeset

Review follow-ups

  • Renumbered migrations above current main (recheck before merge if main lands more).
  • Cadence documented on ADR/design; schedule SQL still run_at = now()+period as ADR says.

Stack

#3335 → #3338 ← this → #3341 → #3342 → #3343.

Open in Web Open in Cursor 

Copilot AI balanced review requested due to automatic review settings November 25, 2026 10:03
@adlerhurst
adlerhurst added this pull request to stack #3337 November 25, 2026 10:03
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cloud Ready Ready Preview Dec 3, 2026 5:37am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@zitadel-kanban zitadel-kanban Bot moved this to Inbox in Engineering Kanban Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: 7b82aed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@zitadel/server Minor
@zitadel/cli Minor
@zitadel/testing Minor
@zitadel/server-darwin-arm64 Minor
@zitadel/server-darwin-x64 Minor
@zitadel/server-linux-arm64 Minor
@zitadel/server-linux-x64 Minor
@zitadel/server-win32-x64 Minor
@zitadel/api Minor
@zitadel/components Minor
@zitadel/config Minor
@zitadel/sdk-angular Minor
@zitadel/sdk-core Minor
@zitadel/sdk-next Minor
@zitadel/sdk-nuxt Minor
@zitadel/sdk-qwik Minor
@zitadel/sdk-qwik-router Minor
@zitadel/sdk-react Minor
@zitadel/sdk-solid Minor
@zitadel/sdk-solid-start Minor
@zitadel/sdk-svelte Minor
@zitadel/sdk-sveltekit Minor
@zitadel/sdk-tanstack-start Minor
@zitadel/sdk-vue Minor
@zitadel/cloud Patch
@zitadel/client-sdk-contract Patch
@zitadel/server-sdk-contract Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fforootd fforootd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two findings inline: the migration numbers collide with main, and the periodic reschedule drifts. Stack overview on #3335.


Generated by Claude Code

@adlerhurst
adlerhurst removed this pull request from stack #3337 December 3, 2026 03:53
@cursor
cursor Bot force-pushed the cursor/jobs-slice-1-statements-ee5e branch from 7b82aed to d2d216a Compare December 3, 2026 03:54
@adlerhurst
adlerhurst added this pull request to stack #3597 December 3, 2026 03:57
cursoragent and others added 2 commits December 3, 2026 04:47
jobs + job_schedules across dialects, SetPeriodic/Take allowlist, stmttest,
changeset; CTE RETURNING columns qualified for Postgres.

Co-authored-by: s2s4gq4jby <s2s4gq4jby@privaterelay.appleid.com>
Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
sqlite 055, postgres 068, spanner 073. Regenerate AllStatements mock
so SetAuthRequestCode and SetPeriodic both remain.

Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/jobs-slice-1-statements-ee5e branch from d2d216a to d165db2 Compare December 3, 2026 04:47
Renumbered jobs migrations leave jobs already applied under an older goose
version; CREATE TABLE then fails with SQLSTATE 42P07. Treat that like
duplicate_column so preview migrate drops and remigrates once.

Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 3bff18d0 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

4 participants