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.



232
233
234
# File 'lib/sequel/extensions/constraint_validations.rb', line 232

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

#unique(*args) ⇒ Object

Alias of add_unique_constraint for similarity to create_table generator.



237
238
239
# File 'lib/sequel/extensions/constraint_validations.rb', line 237

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