Skip to content

Conversation

@pyramation
Copy link
Contributor

Summary

Adds default_value_ast jsonb column to collections_public.field table and marks default_value with the @sqlExpression smart 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):

  • Verify coordination with constructive-db: PR #178 in constructive-db has the same changes in extensions/@pgpm/db-meta-schema/. After merging this PR, constructive-db should pull from upstream to stay in sync
  • Test deployment: Run the deploy script against a test database to verify the ALTER TABLE and COMMENT statements execute correctly

Notes

The @sqlExpression smart comment works with the graphile-sql-expression-validator plugin (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)

- Add default_value_ast jsonb column to collections_public.field table
- Add @sqlExpression smart comment on default_value column for Graphile plugin
- AST is the source of truth for SQL expression validation

Related to constructive-io/constructive-planning#476
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit 687546a into main Jan 1, 2026
22 checks passed
@pyramation pyramation deleted the devin/1767241887-sql-expression-ast-field branch January 1, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants