Skip to content

feat(schema)!: adopt Record declarations for beta.3 - #488

Merged
medz merged 3 commits into
mainfrom
feat/record-schema
Sep 21, 2026
Merged

medz merged 3 commits into
mainfrom
feat/record-schema

Conversation

@medz

@medz medz commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Replace annotated entities and separately authored row types with a single model('table', (columns...)) declaration. The generator emits immutable rows and typed query APIs; named Record fields declare local keys, checks, and forward/reverse relationships. Model is a non-constructible type annotation for cyclic references.

This is the breaking schema change in 6.0.0-beta.3. The old public declarations, annotation reader, generation branches, and authoring tools are removed. Catalog import, CLI initialization, named SQL, fixtures, and public guides use the new API. Existing physical snapshots and migration history stay unchanged.

Validation

  • Codex approved final head 6256e4f136720fda6ea6c948ba9c76e4930aba85; all review threads are resolved.
  • Full CI passed: 1,237 native tests, 41 capability skips, covering SQLite, PostgreSQL 18, MySQL 8.4, and MariaDB 11.8.
  • Chrome JavaScript and WebAssembly passed. Formatting, analysis, Dartdoc links, and committed Web resource fingerprints passed.
  • Regression coverage includes generation diagnostics, cross-file model renames preserving snapshot fingerprints, and real forward/reverse relationship queries. Existing committed snapshots and historical migrations are unchanged.
  • dart pub publish --dry-run: zero warnings.

No related open issue.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 160 files, which is 60 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 701ef881-6cee-46a9-aba5-bc4a387c2915

📥 Commits

Reviewing files that changed from the base of the PR and between a7be283 and 6256e4f.

📒 Files selected for processing (160)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • assets/sqlite/worker-4360a5ed33bec6997af5514e04d393eb8fae00e331f2532a696ce34b0b9e44a1.js
  • doc/README.md
  • doc/acceptance.md
  • doc/api.md
  • doc/authoring.md
  • doc/backfills.md
  • doc/capabilities.md
  • doc/checks.md
  • doc/cli.md
  • doc/computed.md
  • doc/contributing.md
  • doc/decimals.md
  • doc/defaults.md
  • doc/execution.md
  • doc/flutter.md
  • doc/generation.md
  • doc/importing.md
  • doc/migrations.md
  • doc/mysql-migrations.md
  • doc/mysql.md
  • doc/named-sql.md
  • doc/observability.md
  • doc/performance.md
  • doc/progress.md
  • doc/queries.md
  • doc/relations.md
  • doc/sqlite-web.md
  • doc/types.md
  • doc/watch.md
  • example/company/README.md
  • example/company/main.dart
  • example/company/schema.dart
  • example/company/schema.orm.dart
  • example/company/schema.snapshot.dart
  • example/flutter/lib/acceptance.dart
  • example/flutter/lib/acceptance_web.dart
  • example/flutter/lib/legacy/schema.dart
  • example/flutter/lib/legacy/schema.orm.dart
  • example/flutter/lib/legacy/seed.dart
  • example/flutter/lib/schema.dart
  • example/flutter/lib/schema.orm.dart
  • example/main.dart
  • example/queries.dart
  • example/schema.dart
  • example/schema.orm.dart
  • example/teams/main.dart
  • example/teams/schema.dart
  • example/teams/schema.orm.dart
  • lib/schema.dart
  • lib/schema_model.dart
  • lib/src/cli/init.dart
  • lib/src/generate/build.dart
  • lib/src/generate/emitter.dart
  • lib/src/generate/exception.dart
  • lib/src/generate/import.dart
  • lib/src/generate/model.dart
  • lib/src/generate/queries.dart
  • lib/src/generate/reader.dart
  • lib/src/generate/schema.dart
  • lib/src/generate/schema/columns.dart
  • lib/src/generate/schema/reader.dart
  • lib/src/generate/schema/sources.dart
  • lib/src/generate/schema/syntax.dart
  • lib/src/generate/types.dart
  • lib/src/schema/declaration.dart
  • lib/src/schema/queries.dart
  • lib/src/sqlite/web_build.dart
  • pubspec.yaml
  • test/build_runner_test.dart
  • test/builder_test.dart
  • test/check_test.dart
  • test/cli_test.dart
  • test/cli_workflow_test.dart
  • test/client_default_test.dart
  • test/computed_test.dart
  • test/custom_codec_test.dart
  • test/decimal_average_test.dart
  • test/decimal_division_test.dart
  • test/decimal_precision_test.dart
  • test/decimal_test.dart
  • test/generated_database_test.dart
  • test/generator_dialects_test.dart
  • test/generator_test.dart
  • test/import_test.dart
  • test/instant_test.dart
  • test/integer_test.dart
  • test/layer_boundaries_test.dart
  • test/many_to_many_test.dart
  • test/mysql_import_test.dart
  • test/named_sql_generation_test.dart
  • test/named_sql_test.dart
  • test/nominal_database_test.dart
  • test/nominal_generation_test.dart
  • test/observation_test.dart
  • test/plan_test.dart
  • test/public_api_test.dart
  • test/record_database_test.dart
  • test/record_generation_test.dart
  • test/record_relations_test.dart
  • test/relation_test.dart
  • test/schema_boundary_test.dart
  • test/support/browser/main.dart
  • test/support/browser/precision.dart
  • test/support/browser/schema.dart
  • test/support/browser/schema.orm.dart
  • test/support/browser/teams.dart
  • test/support/checks/schema.dart
  • test/support/checks/schema.orm.dart
  • test/support/codecs/native.dart
  • test/support/codecs/schema.dart
  • test/support/codecs/schema.orm.dart
  • test/support/codecs/types.dart
  • test/support/computed/schema.dart
  • test/support/computed/schema.orm.dart
  • test/support/decimals/native.dart
  • test/support/decimals/schema.dart
  • test/support/decimals/schema.orm.dart
  • test/support/defaults/schema.dart
  • test/support/defaults/schema.orm.dart
  • test/support/instants/native.dart
  • test/support/instants/schema.dart
  • test/support/instants/schema.orm.dart
  • test/support/integers/native.dart
  • test/support/integers/schema.dart
  • test/support/integers/schema.orm.dart
  • test/support/named_sql/native.dart
  • test/support/named_sql/queries.dart
  • test/support/named_sql/queries.queries.dart
  • test/support/native_execution.dart
  • test/support/nominal/schema.dart
  • test/support/nominal/schema.orm.dart
  • test/support/precision/native.dart
  • test/support/precision/schema.dart
  • test/support/precision/schema.orm.dart
  • test/support/relations/schema.dart
  • test/support/relations/schema.orm.dart
  • test/support/temporal_precision/schema.dart
  • test/support/temporal_precision/schema.orm.dart
  • test/support/temporals/native.dart
  • test/support/temporals/schema.dart
  • test/support/temporals/schema.orm.dart
  • test/support/unconstrained/schema.dart
  • test/support/unconstrained/schema.orm.dart
  • test/temporal_precision_test.dart
  • test/temporal_test.dart
  • test/types_test.dart
  • test/unconstrained_relation_test.dart
  • test/watch_test.dart
  • tool/benchmark_decimal.dart
  • tool/benchmark_editor.dart
  • tool/compare_authoring.dart
  • tool/src/authoring.dart
  • tool/src/authoring_fixture.dart
  • tool/src/build_fixture.dart
  • tool/src/runtime_cases.dart

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T19:35:55.156215Z 6256e4f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prisma-dart canceled.

Name Link
🔨 Latest commit 6256e4f
🔍 Latest deploy log https://app.netlify.com/projects/prisma-dart/deploys/6ab184c6102d150008dc855d

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a37da133d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/src/generate/schema/columns.dart
@medz

medz commented Sep 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review Please re-review exact head a37da13. The private Record field finding was reproduced and is already rejected by the analyzer diagnostic gates before any schema or named SQL output is emitted; details and positive SQL-name mapping evidence are in #488 (comment). Please verify that evidence and reassess the remaining diff.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a37da133d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/src/generate/schema/reader.dart Outdated
Comment thread lib/src/generate/schema/reader.dart
@medz

medz commented Sep 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review Review final head 55c5a96 after the fixes for empty CHECK names and computed-only models. Both new regression cases failed before the fixes and now pass with source-located GenerationException diagnostics. The first private Record field finding remains resolved by the existing semantic diagnostic gates, with reproduction evidence in its thread. Please review the final changes and report any remaining actionable findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55c5a96ef7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/src/generate/schema/reader.dart
Comment thread lib/src/generate/schema/sources.dart Outdated
@medz
medz merged commit 0265a03 into main Sep 21, 2026
7 checks passed
@medz
medz deleted the feat/record-schema branch September 22, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant