[adm 5.3] Generate database migrations from canonical generated APIs - #50
Merged
Conversation
artiphishle
marked this pull request as ready for review
August 10, 2026 14:57
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.
Closes #8
Part of ankhorage/studio#120.
Scope
@ankhorage/contracts@^4.0.2canonicalAppManifest.generatedApisdesired statemanifest.data.apisreaderuuid,text,number,boolean,datetimeandjsonto provider-owned SQL typesArchitecture boundary
This PR is only the generated API -> database infrastructure bridge.
It deliberately does not generate:
src/generated/apis/appApi.tssrc/generated/apis/apiHandlers.tssrc/generated/apis/openapi.jsonmanifest.data.apisNormalized endpoint/operation metadata remains owned by
@ankhorage/data-sources; physical database artifacts remain owned here.Policy boundary
The current canonical
GeneratedApiOperationPolicyRefcarries policy identity/operation intent, but no provider SQL expression. Infra therefore enables RLS when policy intent is explicit and emits a diagnostic warning rather than fabricatingCREATE POLICY ... USING (...)semantics.Validation
Behavior-focused tests cover deterministic artifact generation, SQL type/default/constraint mapping, deterministic seed UUIDs, RLS intent, invalid definitions, duplicate physical targets, no generated API service workload, and no artifacts when generated APIs are absent.
Because GitHub Actions are currently unavailable, the final Bun/Paradox/lockfile validation will be run locally before this draft is merged.
Changeset
Major: the public legacy generated-API artifact surface is removed and Infra moves from the historical
data.apiscontract to the canonicalgeneratedApiscontract.