Skip to content

Fix createIndex for sequence - #944

Open
fogelito wants to merge 2 commits into
mainfrom
index-sequence-attribute
Open

Fix createIndex for sequence#944
fogelito wants to merge 2 commits into
mainfrom
index-sequence-attribute

Conversation

@fogelito

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@fogelito, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 01b7af55-2968-4ca4-8d41-33b80ebb2427

📥 Commits

Reviewing files that changed from the base of the PR and between eaae8fd and fb699e2.

📒 Files selected for processing (3)
  • src/Database/Adapter/Postgres.php
  • src/Database/Adapter/SQLite.php
  • tests/e2e/Adapter/Scopes/IndexTests.php
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch index-sequence-attribute

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.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes PostgreSQL and SQLite index creation by consistently mapping public internal attributes, including $sequence, to their physical SQL column names.

  • Reuses the shared internal-key mapping in PostgreSQL and SQLite index generation.
  • Adds end-to-end coverage for sequence fields in regular and unique composite indexes during collection and standalone index creation.

Confidence Score: 5/5

The PR appears safe to merge with no changed-code defects identified.

PostgreSQL and SQLite now use the same public-to-physical attribute mapping already used by SQL query paths, and the added tests exercise both index creation entry points.

Important Files Changed

Filename Overview
src/Database/Adapter/Postgres.php Replaces incomplete special-case index mappings with the shared internal-key helper, correctly mapping $sequence to _id.
src/Database/Adapter/SQLite.php Uses the shared internal-key helper when generating index columns while preserving existing $id behavior.
tests/e2e/Adapter/Scopes/IndexTests.php Adds collection-time and standalone sequence-index tests covering physical index inclusion, ordering, and composite uniqueness behavior.

Reviews (1): Last reviewed commit: "Merge branch 'main' of github.com:utopia..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant