Skip to content

feat: upstream pgpm-cron module + metaschema_public.scheduled_cron table#95

Merged
pyramation merged 2 commits into
mainfrom
feat/pgpm-cron
Jul 9, 2026
Merged

feat: upstream pgpm-cron module + metaschema_public.scheduled_cron table#95
pyramation merged 2 commits into
mainfrom
feat/pgpm-cron

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Upstreams the pg_cron work from constructive-db#1988 so this repo stays the source of truth for shared modules:

  • packages/metaschema-schema: new metaschema_public.scheduled_cron table (declarative pg_cron job registry — database_id FK cascade, name, schedule, command, is_enabled, unique on (database_id, name)), plus plan entry and regenerated sql/metaschema-schema--0.15.5.sql bundle.
  • packages/pgpm-cron (new module, @pgpm/cron): open-code sync mechanics — pgpm_cron.sync_scheduled_cron() reconciles scheduled_cron rows into pg_cron (cron.schedule for enabled rows, guarded cron.unschedule for disabled ones; silently no-ops when pg_cron is absent). Intended for local/exported single-database deployments; the platform cross-DB schedule_in_database fan-out lives in constructive-db. Cross-requires metaschema-schema:.../scheduled_cron/table.
  • Listed pgpm-cron in MODULES.md.

Note: pg_cron is one-per-cluster, so it is deliberately NOT a control-file requires — the module is safe to deploy into databases that will never host pg_cron (see the package README).

Verified locally against postgres-plus:18: pgpm deploy/verify/revert --package pgpm-cron full cycle passes and the scheduled_cron table lands with the expected shape; packages/metaschema-schema jest suite passes.

Link to Devin session: https://app.devin.ai/sessions/7d74797f980143949a673f4bfff58ebe
Requested by: @pyramation

@pyramation pyramation self-assigned this Jul 9, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@socket-security

socket-security Bot commented Jul 9, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@pyramation pyramation merged commit a81bbc0 into main Jul 9, 2026
23 checks passed
@pyramation pyramation deleted the feat/pgpm-cron branch July 9, 2026 08:03
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.

1 participant