Module: Sequel::ConstraintValidations::AlterTableGeneratorMethods

Includes:
CreateTableGeneratorMethods
Defined in:
lib/sequel/extensions/constraint_validations.rb

Overview

Additional methods for the alter_table generator to support constraint validations, used to give it a more similar API to the create_table generator.

Instance Attribute Summary

Attributes included from CreateTableGeneratorMethods

#validations

Instance Method Summary collapse

Methods included from CreateTableGeneratorMethods

#validate, #validation

Instance Method Details

#constraint(*args) ⇒ Object

Alias of add_constraint for similarity to create_table generator.



198
199
200
# File 'lib/sequel/extensions/constraint_validations.rb', line 198

def constraint(*args)
  add_constraint(*args)
end

#unique(*args) ⇒ Object

Alias of add_unique_constraint for similarity to create_table generator.



203
204
205
# File 'lib/sequel/extensions/constraint_validations.rb', line 203

def unique(*args)
  add_unique_constraint(*args)
end