Skip to Content Skip to Search

Active Record PostgreSQL Adapter Alter Table

Methods
A
N
V

Attributes

[R] constraint_validations
[R] exclusion_constraint_adds
[R] unique_constraint_adds

Class Public methods

new(td)

# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 367
def initialize(td)
  super
  @constraint_validations = []
  @exclusion_constraint_adds = []
  @unique_constraint_adds = []
end

Instance Public methods

add_exclusion_constraint(expression, options)

# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 378
def add_exclusion_constraint(expression, options)
  @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, options)
end

add_unique_constraint(column_name, options)

# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 382
def add_unique_constraint(column_name, options)
  @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, options)
end

validate_constraint(name)

# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 374
def validate_constraint(name)
  @constraint_validations << name
end