You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After tracing through the codebase, the diagnosis in this PR is incorrect and there's a bug in the fix. Closing in favor of a proper solution.
What's actually happening
The internal packages/metaschema (in constructive-db) calls db_utils.timestamps() on every metaschema_public table, which adds physicalcreated_at/updated_at columns via ALTER TABLE ADD COLUMN. These are real database columns — not virtual or computed fields.
The published pgpm-modules/metaschema-schema does not include these columns in its CREATE TABLE statements. When the export tool introspects a server running the internal package (which has the physical columns), it generates INSERTs for those columns. When deployed against a database built from the published package (which lacks the columns) → failure.
TL;DR: This is a schema drift between the internal and published metaschema packages — not a stamps/computed-column issue.
Bug: lang_column exclusion
lang_column is a physical column defined in the published metaschema-schema for full_text_search:
CREATETABLEmetaschema_public.full_text_search (
...
lang_column text, -- this is a real column
...
);
Excluding it from export would cause data loss.
Unnecessary exclusions
The services_public and metaschema_modules_public tables don't have timestamp columns in either version — their GraphQL types don't expose createdAt/updatedAt. Adding excludeFields to those ~40 table configs is harmless but pointless.
The real fix
Update the published pgpm-modules/metaschema-schema to include the timestamp columns directly in the CREATE TABLE definitions, so the published schema matches what introspection sees at runtime. This eliminates the drift entirely without needing any excludeFields workaround.
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
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.
No description provided.