-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
refactorInternal restructuring, no behavior changeInternal restructuring, no behavior change
Description
Summary
Feature tables (created dynamically in the features PG schema) currently use a plain record_srn TEXT column to link back to records.srn. This should be an actual foreign key constraint.
Why
- pg_graphql (and similar tools) auto-discover relationships via FK constraints — no need for comment directives
- Referential integrity enforced at the DB level
- Our insert volumes don't warrant avoiding FK overhead
Changes
- In
PostgresFeatureStore.create_table, change therecord_srncolumn definition to includeREFERENCES records(srn) - Verify bulk insert performance is acceptable with the constraint
- Add migration for any existing feature tables (if any exist in deployed environments)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorInternal restructuring, no behavior changeInternal restructuring, no behavior change