Module: SchemaPlus::ActiveRecord::ConnectionAdapters::PostgresqlAdapter::AddColumnOptions

Defined in:
lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#default_expr_valid?(expr) ⇒ Boolean

Returns:

  • (Boolean)

435
436
437
# File 'lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb', line 435

def default_expr_valid?(expr)
  true # arbitrary sql is okay in PostgreSQL
end

#sql_for_function(function) ⇒ Object


439
440
441
442
443
444
# File 'lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb', line 439

def sql_for_function(function)
  case function
    when :now
      "NOW()"
  end
end