refactor(server): remove schema naming env var forwarding from pgSettings#830
Merged
pyramation merged 1 commit intomainfrom Mar 17, 2026
Merged
Conversation
…ings These settings (constructive.simple_schema_names, constructive.schema_use_underscores) are now set at the database level via ALTER DATABASE SET during provision, so the server no longer needs to forward them from env vars. This keeps the server generic and open-source — schema naming strategy is a database-level concern, not a server configuration concern.
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 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
Removes the
CONSTRUCTIVE_SIMPLE_SCHEMA_NAMESandCONSTRUCTIVE_SCHEMA_USE_UNDERSCORESenvironment variable forwarding from the GraphQL server'spgSettingscontext (added in PR #816).These schema naming strategy settings are now configured at the database level via
ALTER DATABASE SETduring provision, so every PostgreSQL connection inherits them automatically. The server no longer needs to act as a pass-through for these values, keeping it generic and decoupled from schema naming concerns.What changed: 9 lines removed from
graphql/server/src/middleware/graphile.ts— the twoif (process.env.CONSTRUCTIVE_*)blocks inbuildPreset'scontextcallback. No new code added.Review & Testing Checklist for Human
ALTER DATABASE SETconfigured — Any database that was relying onCONSTRUCTIVE_SIMPLE_SCHEMA_NAMES/CONSTRUCTIVE_SCHEMA_USE_UNDERSCORESenv vars on the server must now have equivalent database-level settings (constructive.simple_schema_names,constructive.schema_use_underscores). Without this, schema creation will revert to default behavior (hash suffixes, dashes). Check with:psql <dbname> -c "SELECT name, setting FROM pg_db_role_setting WHERE setdatabase = (SELECT oid FROM pg_database WHERE datname = '<dbname>')"orSHOW constructive.simple_schema_names;CONSTRUCTIVE_SIMPLE_SCHEMA_NAMESorCONSTRUCTIVE_SCHEMA_USE_UNDERSCORESto ensure nothing else references them.myapp_app_publicnotmyapp_1234567_app_public).Notes
pnpm build).