class

Ralph::Migrations::Schema::ExpressionIndexDefinition

Inherits Reference / Object

Represents an expression index

Expression indexes index the result of an expression rather than a column. Useful for case-insensitive searches, computed values, etc.

Example

# Case-insensitive email lookup
add_expression_index :users, "lower(email)", name: "idx_users_email_lower"

# Index on extracted year
add_expression_index :orders, "extract(year from created_at)", name: "idx_orders_year"

Constructors

new(table : String, expression : String, name : String, unique : Bool = false, using : String | Nil = nil)
Source

Instance methods

expression
Source
name
Source
table
Source
to_drop_sql
Source
to_sql
Source
unique
Source
using
Source