chore: schema update (mar-26) + fix migrate-client index.ts preservation#906
Merged
Merged
Conversation
Auto-generated by schema-propagation workflow. Source: constructive-db@c72ec069
The pregenerate:migrate-client script was deleting src/index.ts along with the generated src/migrate/ directory. Since generateMulti only writes a root barrel when there are multiple targets, the single-target migrate-client never got its index.ts regenerated — breaking any consumer that imports @pgpmjs/migrate-client. Two fixes: 1. Remove src/index.ts from the rimraf in pregenerate:migrate-client 2. Have generate-migrate-client.ts write the root barrel after codegen as a safety net (matching the multi-target pattern)
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Combines the automated schema update from
constructive-db@c72ec069(PR #904) with a fix for the build-breaking bug it introduced (PR #905).Schema changes (auto-generated):
SqlMigration→SqlAction(rename across all SDK targets)FieldModuleremovedMigrateFileaddedBuild fix (
generate-migrate-client.ts+package.json):pregenerate:migrate-clientscript was deletingsrc/index.ts(the package entry point), andgenerateMultionly writes a root barrel for multi-target outputs — so the single-target migrate-client never got it back. This brokepgpm/exportwhich imports@pgpmjs/migrate-client.../migrate-client/src/index.tsfrom the rimraf globgenerate-migrate-client.tsto write the root barrel as a safety netUpdates since last revision:
sdk/migrate-client/src/index.ts(export * from './migrate') on this branch so the build fix takes effect immediately — not just on the nextgenerate:migrate-clientrun.Review & Testing Checklist for Human
SqlMigration→SqlActionrename is complete. The CLIusagestring incommands.tsis auto-generated and very long — confirm it referencessql-action(notsql-migration). Also grep for any leftoverSqlMigration/sqlMigration/sql_migrationreferences in non-generated code (especiallypgpm/export/src/export-graphql.tswhich usesdb.sqlAction.findMany).FieldModuleremoval is intentional and no code outside the generated SDK still references it.Notes
sdk/constructive-sdk/package.json(line 29) andsdk/constructive-sdk/scripts/generate-migrate-client.ts(new lines 9-10, 70-81).sdk/migrate-client/src/index.tsis now present in the branch (net zero diff vs. main since it was deleted by chore: update schemas from constructive-db (mar-26-139am) #904 and restored). The generate script safety net ensures future regenerations won't lose it again.path.resolve(OUTPUT_DIR, 'index.ts')in the generate script resolves relative tosdk/constructive-sdk/(the pnpm working directory), so it should correctly targetsdk/migrate-client/src/index.ts.Link to Devin session: https://app.devin.ai/sessions/6c7e6bf137a34786827fc77a43a7a84a
Requested by: @pyramation