Add table_template_module and remove old settings modules #36
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
Adds the
table_template_moduletable and removes the three old module tables it replaces:user_profiles_module,user_settings_module, andorganization_settings_module.The new
table_template_moduleenables unified table creation templates usingnode_typedispatch, allowing different table types to be created through a single module table rather than requiring separate module tables for each type.This is an upstream sync from constructive-db PR #340.
Table structure:
database_id,schema_id,private_schema_id- standard module referencestable_id,owner_table_id- references to created table and owner tabletable_name- name of the table to createnode_type- template type for dispatch (e.g., 'TableUserProfiles', 'TableOrganizationSettings', 'TableUserSettings')data- jsonb for type-specific parametersReview & Testing Checklist for Human
user_profiles_module,user_settings_module,organization_settings_module) directlypnpm testinpackages/metaschema-modulesto ensure tests passRecommended test plan:
table_template_moduletable is created with correct structureUpdates since last revision
user_profiles_module,user_settings_module,organization_settings_moduleNotes
This is a breaking change for any consumers using the old module tables directly. The trigger logic and generator functions that dispatch based on
node_typelive in constructive-db, not this public repo.Link to Devin run: https://app.devin.ai/sessions/f4b2066a3e3e434da15de84fba001ac3
Requested by: Dan Lynch (@pyramation)