feat: upstream pgpm-cron module + metaschema_public.scheduled_cron table#95
Merged
Conversation
… (upstream from constructive-db)
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstreams the pg_cron work from constructive-db#1988 so this repo stays the source of truth for shared modules:
packages/metaschema-schema: newmetaschema_public.scheduled_crontable (declarative pg_cron job registry —database_idFK cascade,name,schedule,command,is_enabled, unique on(database_id, name)), plus plan entry and regeneratedsql/metaschema-schema--0.15.5.sqlbundle.packages/pgpm-cron(new module,@pgpm/cron): open-code sync mechanics —pgpm_cron.sync_scheduled_cron()reconcilesscheduled_cronrows into pg_cron (cron.schedulefor enabled rows, guardedcron.unschedulefor disabled ones; silently no-ops when pg_cron is absent). Intended for local/exported single-database deployments; the platform cross-DBschedule_in_databasefan-out lives in constructive-db. Cross-requiresmetaschema-schema:.../scheduled_cron/table.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-cronfull cycle passes and thescheduled_crontable lands with the expected shape;packages/metaschema-schemajest suite passes.Link to Devin session: https://app.devin.ai/sessions/7d74797f980143949a673f4bfff58ebe
Requested by: @pyramation