feat: add inflection-db package for database-level naming conventions#78
Merged
Conversation
Publishes the inflection_db schema as @pgpm/inflection-db, providing 14 SQL functions for PostgreSQL naming conventions (get_table_name, get_field_name, get_index_name, etc.) that wrap @pgpm/inflection with 63-char identifier truncation. Previously lived only inside constructive-db as a private package, causing runtime dependency issues when downstream consumers couldn't resolve the inflection_db schema.
🤖 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:
|
get_table_name, get_field_name, and get_identifier_name each have two overloads (text and text[]). PostgreSQL requires explicit signatures when dropping ambiguous function names.
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
Publishes
inflection_dbas@pgpm/inflection-db— 14 SQL functions that wrap@pgpm/inflectionwith 63-char identifier truncation for PostgreSQL naming conventions.Functions:
get_table_name,get_field_name,get_index_name,get_namespace_name,get_schema_name,get_check_constraint_name,get_foreign_key_field_name,get_foreign_key_index_name,get_identifier,get_identifier_name,get_primary_key_index_name,get_table_plural_name,get_table_singular_name,get_unique_index_name.This was previously a private package inside
constructive-db, causing runtime dependency issues when downstream consumers couldn't resolve theinflection_dbschema. Publishing it here makes it available as a first-class pgpm module with"publishConfig": { "access": "public" }.Dependencies:
@pgpm/inflection(workspace),@pgpm/verify(workspace).Link to Devin session: https://app.devin.ai/sessions/9d079a6032fc40e8985a55fead8c4268
Requested by: @pyramation