Skip to Content Skip to Search

class ActiveRecord::ConnectionAdapters::PostgreSQL::AlterTable

Active Record PostgreSQL Adapter Alter Table

Inherits From

Attributes

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

Public class methods

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

Public instance methods

Source code GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 375
def add_exclusion_constraint(expression, options)
  @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, options)
end
Source code GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 379
def add_unique_constraint(column_name, options)
  @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, options)
end
Source code GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 371
def validate_constraint(name)
  @constraint_validations << name
end

Definition files