feat: add default_value_ast column for SQL expression validation #29
+14
−2
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
default_value_ast jsonbcolumn tocollections_public.fieldtable and marksdefault_valuewith the@sqlExpressionsmart comment for the Graphile SQL expression validator plugin.This is the upstream change for constructive-db PR #178. The AST column will store the parsed representation of SQL default value expressions, with AST being the source of truth for validation.
Related to constructive-io/constructive-planning#476.
Review & Testing Checklist for Human
This is a low-risk schema addition (nullable column, no data migration):
extensions/@pgpm/db-meta-schema/. After merging this PR, constructive-db should pull from upstream to stay in syncNotes
The
@sqlExpressionsmart comment works with thegraphile-sql-expression-validatorplugin (merged in constructive PR #543). Without the plugin loaded, the comment is inert.Link to Devin run: https://app.devin.ai/sessions/7655646c517d4c74b0f7b827a102d494
Requested by: Dan Lynch (@pyramation)