Feat/UI schema dual write#77
Merged
Merged
Conversation
…s admin reload loop)
…sitive type changes introspect-live reads PG udt_name (int4, bool, _text, timestamptz, varchar without length) while the desired schema uses SQL names (integer, boolean, text[], timestamp with time zone, varchar(255)). The diff compared them with raw string equality, flagging every core column as a 'type change' and making `nextly migrate` refuse every existing Postgres database. Add normalizeType (mirrors normalizeDefault) and compare normalised tokens; the emitted op keeps the original names.
…tgres migrate:fresh ran SET session_replication_role to disable FK checks before dropping, but that GUC is superuser-only and Neon/RDS/Supabase reject it with 'permission denied to set parameter', aborting the command. The drop already uses DROP TABLE ... CASCADE (which resolves FK deps), so the SET is redundant: make it best-effort on Postgres (swallow only the permission error, propagate real ones). Exported disable/enableForeignKeyChecks for unit testing.
…ual-write Two coupled changes so UI-authored entities match code-first and feed migrations: 1. Widen ui-schema.json field types from the 9-type v1 subset to the full canonical FieldDefinition set (adds email, password, code, radio, repeater, group, component, json, chips), with recursive nested fields for container types and per-type validation. No SQL changes — the manifest already round-trips through getColumnDescriptor with no translation. Admin mirror list widened to match. 2. Database-mode builder Save now also writes ui-schema.json (collections, singles, components) via shared manifest mappers; schemaFileApi gains single/component writers + deleters; delete parity in the query hooks; field picker offers the full canonical set in both modes. Failure to write the file warns without rolling back the DB apply.
Contributor
PR title fails Conventional Commits checkExamples of valid titles:
|
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
Type of change
Related issues
Changeset
This repo uses Changesets. If your PR changes any publishable package under
packages/*, you must include a changeset:Then commit the generated
.changeset/*.mdfile.apps/*)Test plan
pnpm lintpnpm check-typespnpm buildChecklist
mainbranchScreenshots / recordings
Notes for reviewers