module Postgresql::Check::TableDefinition
Public Instance Methods
check(condition, options)
click to toggle source
Add new check constraint to table
Example:
create_table :goods do |t| t.float :price t.check 'price > 0', :name => 'goods_price_gt_0_check' end
# File lib/postgresql/check/table_definition.rb, line 11 def check(condition, options) checks << [condition, options] end
checks()
click to toggle source
# File lib/postgresql/check/table_definition.rb, line 15 def checks @checks ||= [] end