feat(blueprint): Index section with unique/ASC-DESC dialect support#114
Merged
Conversation
Allow add/edit/drop indexes in the table blueprint modal, including ASC/DESC column order and UNIQUE vs accept-duplicates. ClickHouse and Redshift are flagged unsupported via dialectSupportsIndex. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
Expose an optional index filter predicate for dialects that support partial indexes (Postgres family, SQL Server/Azure SQL, SQLite). Other dialects keep the field hidden and emit -- review: if a filter sneaks in. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
Prepend DROP INDEX/FK/trigger before column alters so DROP COLUMN cannot run while an index still references the column. Keep replace-edit and pending remove in sync via replaces, and require confirm/enter when the catalog has not loaded a partial-index WHERE filter. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
huyplb
marked this pull request as ready for review
July 27, 2026 03:39
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_11132e1e-e01d-40f7-b29e-30dfe6d3c4e9) |
2 tasks
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
Adds an Indexes section to the table blueprint modal: add, edit, drop, UNIQUE vs accept-duplicates, per-column ASC/DESC, and optional filtered/partial WHERE.
Dialect research (
dialectSupportsIndex)WHERE: Postgres, Cockroach, Yugabyte, SQL Server, Azure SQL, SQLiteALTER TABLE … CONSTRAINT(filters require a UNIQUE INDEX, not a constraint)Implementation
appendFkTriggerSqlincludes indexesfilteris supportedIndexInfo.filteroptional field for future catalog loadingTest plan
dialect-index-support.test.ts, blueprint index SQL (incl. WHERE + unsupported review)cd apps/web && npx tsc --noEmit