Class: Straitjacket::CheckConstraint

Inherits:
Constraint show all
Defined in:
lib/straitjacket.rb

Instance Attribute Summary

Attributes inherited from Constraint

#column, #content, #name, #options, #table

Instance Method Summary collapse

Methods inherited from Constraint

#apply, #initialize

Constructor Details

This class inherits a constructor from Straitjacket::Constraint

Instance Method Details

#sqlObject



127
128
129
# File 'lib/straitjacket.rb', line 127

def sql
  %[ALTER TABLE "#{table}" ADD CONSTRAINT "#{name}" CHECK (#{@content})]
end