Skip to content

Feat/UI schema dual write#77

Merged
aqib-rx merged 4 commits into
feat/unified-schema-pipelinefrom
feat/ui-schema-dual-write
Jun 3, 2026
Merged

Feat/UI schema dual write#77
aqib-rx merged 4 commits into
feat/unified-schema-pipelinefrom
feat/ui-schema-dual-write

Conversation

@aqib-rx
Copy link
Copy Markdown
Collaborator

@aqib-rx aqib-rx commented Jun 3, 2026

Summary

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would change existing behavior)
  • Documentation update
  • Refactor / chore (no user-facing change)

Related issues

Changeset

This repo uses Changesets. If your PR changes any publishable package under packages/*, you must include a changeset:

pnpm changeset

Then commit the generated .changeset/*.md file.

  • I added a changeset (or this PR only touches non-publishable code: docs, tests, internal tooling, apps/*)
  • I selected the correct semver bump (patch / minor / major)

The changeset-check CI job will fail if a publishable package is modified without a changeset.

Test plan

  • pnpm lint
  • pnpm check-types
  • pnpm build
  • Manually verified the change

Checklist

  • I read CONTRIBUTING (if it exists)
  • My commits follow the Conventional Commits spec (enforced by commitlint)
  • I targeted the main branch
  • I updated relevant documentation

Screenshots / recordings

Notes for reviewers

aqib-rx added 4 commits June 2, 2026 16:40
…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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

PR title fails Conventional Commits check

No release type found in pull request title "Feat/UI schema dual write". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - docs
 - style
 - refactor
 - perf
 - test
 - build
 - ci
 - chore
 - revert

Examples of valid titles:

  • feat(admin): add role manager dialog
  • fix(adapter-postgres): handle connection pool exhaustion
  • chore(deps): bump zod to 4.2.0

@github-actions github-actions Bot added scope: core nextly scope: admin @nextlyhq/admin labels Jun 3, 2026
@aqib-rx aqib-rx merged commit de6a201 into feat/unified-schema-pipeline Jun 3, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: admin @nextlyhq/admin scope: core nextly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant