class

Ralph::Migrations::Schema::PartialIndexDefinition

Inherits Reference / Object

Represents a partial index (index with WHERE condition)

Partial indexes only index rows matching the WHERE condition, making them smaller and faster for specific queries.

Example

# Only index active users
add_partial_index :users, :email, condition: "active = true"

# Only index published posts
add_partial_index :posts, :title, condition: "status = 'published'"

Constructors

new(table : String, column : String, name : String, condition : String, unique : Bool = false)
Source

Instance methods

column
Source
condition
Source
name
Source
table
Source
to_drop_sql
Source
to_sql
Source
unique
Source