class ActiveRecord::ConnectionAdapters::PostgreSQL::Table

Active Record PostgreSQL Adapter Table

def exclusion_constraint(...)

See {connection.add_exclusion_constraint}[rdoc-ref:SchemaStatements#add_exclusion_constraint]

t.exclusion_constraint("price WITH =, availability_range WITH &&", using: :gist, name: "price_check")

Adds an exclusion constraint.
def exclusion_constraint(...)
  @base.add_exclusion_constraint(name, ...)
end

def remove_exclusion_constraint(...)

See {connection.remove_exclusion_constraint}[rdoc-ref:SchemaStatements#remove_exclusion_constraint]

t.remove_exclusion_constraint(name: "price_check")

Removes the given exclusion constraint from the table.
def remove_exclusion_constraint(...)
  @base.remove_exclusion_constraint(name, ...)
end

def remove_unique_constraint(...)

See {connection.remove_unique_constraint}[rdoc-ref:SchemaStatements#remove_unique_constraint]

t.remove_unique_constraint(name: "unique_position")

Removes the given unique constraint from the table.
def remove_unique_constraint(...)
  @base.remove_unique_constraint(name, ...)
end

def unique_constraint(...)

See {connection.add_unique_constraint}[rdoc-ref:SchemaStatements#add_unique_constraint]

t.unique_constraint(:position, name: 'unique_position', deferrable: :deferred, nulls_not_distinct: true)

Adds a unique constraint.
def unique_constraint(...)
  @base.add_unique_constraint(name, ...)
end

def validate_check_constraint(...)

See {connection.validate_check_constraint}[rdoc-ref:SchemaStatements#validate_check_constraint]

t.validate_check_constraint name: "price_check"
t.check_constraint("price > 0", name: "price_check", validate: false)

Validates the given check constraint on the table
def validate_check_constraint(...)
  @base.validate_check_constraint(name, ...)
end

def validate_constraint(...)

See {connection.validate_constraint}[rdoc-ref:SchemaStatements#validate_constraint]

t.validate_constraint "price_check"
t.check_constraint("price > 0", name: "price_check", validate: false)

Validates the given constraint on the table.
def validate_constraint(...)
  @base.validate_constraint(name, ...)
end