luckyframework / luckyframework/avram

Add support for partial indices

Open
#832 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Crystal
Stars
183
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Postgres supports partial indices by passing a where clause to the CREATE INDEX statement, as such:

```sql
CREATE UNIQUE INDEX ON "users" ("email") WHERE NOT "is_deleted";
```

Useful in some cases with soft deletions.

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating the entry point that generates PostgreSQL CREATE INDEX statements and inspect how index options are represented. Done means partial indices can emit a WHERE clause, including the soft-deletion example shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal, postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.