feat: upstream constructive-db changes to pgpm-modules#57
Merged
pyramation merged 3 commits intomainfrom Apr 16, 2026
Merged
Conversation
- Add rate_limits_module table (deploy/revert/verify + plan entry) - Rename sessions_module auth_settings_table default: app_auth_settings → app_settings_auth - Add S3/CORS columns to storage_module: endpoint, public_url_prefix, provider, allowed_origins - Update blueprint verify: add status, constructed_at, error_details, ref_map, constructed_definition - Update relation_provision verify: node_type/node_data replacing create_index/expose_in_api/nodes - Update secure_table_provision verify: node_type/node_data replacing nodes - Delete metaschema-modules snapshot for CI regeneration
🤖 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:
|
The blueprint, relation_provision, and secure_table_provision verify files were updated to match constructive-db's newer column names, but the corresponding deploy files in pgpm-modules still create the old columns. Reverted verify files to match the current deploy state. Restored snapshot with only the changes that match actual deploy diffs: - rate_limits_module added to module list (23 modules, 29 tables) - sessions_module auth_settings_table default: app_settings_auth
…dition Updated from local test run: - database_id FK constraint count: 64152 → 69575 - all FK constraint count: 92266 → 99730
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
Syncs schema changes from
constructive-db/pgpm-modulesthat landed after the last upstream (v0.20.2, Apr 9).New table:
rate_limits_module— full deploy/revert/verify triplet +pgpm.planentry. Tracks rate limit settings, IP rate limits, and rate limits tables per database. Has 5 FK constraints (→database,schema, and 3 →table) plus aUNIQUE(database_id)constraint.Deploy changes:
sessions_module: default forauth_settings_tablerenamed from'app_auth_settings'→'app_settings_auth'storage_module: 4 new nullable columns for S3 connection config (endpoint,public_url_prefix,provider) and CORS (allowed_origins)Snapshot updates:
modules.test.ts.snapupdated:rate_limits_moduleadded to module list (22 → 23 modules, 28 → 29 total tables),sessions_moduledefault rename reflected, and constraint-count snapshots updated (64152 → 69575, 92266 → 99730).All 24/24 CI checks pass.
Review & Testing Checklist for Human
sessions_moduledefault rename:app_auth_settings→app_settings_authis a semantic change. Verify downstream generators/consumers inconstructive-dbandconstructivealready expect the new name before merging.rate_limits_moduleFK targets: Confirm thatmetaschema_public.database,metaschema_public.schema, andmetaschema_public.tableall exist in the deployed metaschema at deploy time (they should, sincerate_limits_moduledepends onmetaschema_modules_public/schema).storage_modulecolumn placement: New S3/CORS columns are inserted mid-table (afterentity_table_id, before the expiry settings). Confirm no downstream code relies on column ordinal position.Notes
blueprint,relation_provision, andsecure_table_provisionwere initially included but reverted — the deploy files in this repo still use the old column names (nodes,create_index,expose_in_apietc.), so updating the verify scripts would break integration tests. Those verify changes should be upstreamed together with their corresponding deploy changes in a future PR.storage_modulenew columns are allNULL-default, so they're backward-compatible for existing deployments.information_schemacross-joins and will break again whenever any module table adds or removes FK constraints. Consider removing thetoMatchSnapshot()calls from those two tests in a follow-up (thetoBeGreaterThanassertions are the real safety net).Link to Devin session: https://app.devin.ai/sessions/f3bc277e0b394290b411b493b7bff17a
Requested by: @pyramation