fix: update storage plugins to use scope instead of membershipType#1237
Open
pyramation wants to merge 2 commits into
Open
fix: update storage plugins to use scope instead of membershipType#1237pyramation wants to merge 2 commits into
pyramation wants to merge 2 commits into
Conversation
The constructive-db scope+prefix unification replaced membership_type int with scope text on all module config tables. Update the graphile plugins that query storage_module to use sm.scope instead of sm.membership_type.
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:
|
Contributor
|
Found 7 test failures on Blacksmith runners: Failures
|
20e110f to
5c4cd30
Compare
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
Updates the graphile storage plugins (
graphile-presigned-url-pluginandgraphile-bucket-provisioner-plugin) to use the newscopecolumn onstorage_moduleinstead of the removedmembership_typecolumn.Changes:
StorageModuleConfig.membershipType: string | null→scope: string— no more null, just the scope string ('app','org', etc.)sm.membership_type→sm.scope,WHERE membership_type IS NULL→WHERE scope = 'app'membershipType !== null→scope !== 'app'storage:{db}:mt:{type}→storage:{db}:scope:{scope}membership_type→scopein all queriesCompanion PR: https://github.com/constructive-io/constructive-db/pull/1415
Review & Testing Checklist for Human
scope !== 'app'correctly identifies entity-scoped storage (replacesmembershipType !== null)owner_idcolumn only for entity-scoped storageNotes
This is a breaking change — requires the constructive-db scope+prefix migration to be deployed first (the
storage_moduletable must have thescopecolumn instead ofmembership_type).Link to Devin session: https://app.devin.ai/sessions/f60e6c4d6c1941b497fae2b064722ff3
Requested by: @pyramation