feat: pass schema naming strategy env vars to pgSettings#816
Merged
Conversation
Forward CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES and CONSTRUCTIVE_SCHEMA_USE_UNDERSCORES env vars into PostgreSQL session context via pgSettings. This allows the constructive-db schema naming triggers to read these settings and produce simpler, more readable schema names for local development. Companion to constructive-db PR #576.
Contributor
🤖 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:
|
This was referenced Mar 17, 2026
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
Add entity_type string property to AuthzMembership, AuthzEntityMembership, AuthzRelatedEntityMembership, AuthzPeerOwnership, and AuthzRelatedPeerOwnership. This allows policy definitions to use entity_type: 'channel' instead of membership_type: 3. The RLS parser resolves the prefix to the correct membership_type integer via memberships_module lookup. For AuthzMembership, required fields updated: either membership_type or entity_type must be provided (validated server-side in parse.sql). Companion to constructive-db PR #816.
3 tasks
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
Forwards two environment variables into PostgreSQL session context via
pgSettings, enabling the schema naming strategy customization added in constructive-db#576.When set, these env vars are included in every PG session as
SET LOCALvariables:CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES→constructive.simple_schema_names— skips hash suffix for multi-tenant schema namesCONSTRUCTIVE_SCHEMA_USE_UNDERSCORES→constructive.schema_use_underscores— uses underscores instead of dashesBoth are no-ops when unset. Intended for local development only.
Review & Testing Checklist for Human
if (req)block intentionally — they're global session settings, not per-request, so this is correct but worth confirming the intentNotes
CONSTRUCTIVE_SIMPLE_SCHEMA_NAMES=false, it still gets forwarded, but the SQL trigger checks= 'true'so it's correctly ignored.Link to Devin session: https://app.devin.ai/sessions/5675853a0d16427d85ca6d32b3188097
Requested by: @pyramation