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.


228
229
230
# File 'lib/sequel/extensions/constraint_validations.rb', line 228

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

#unique(*args) ⇒ Object

Alias of add_unique_constraint for similarity to create_table generator.


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

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