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)


404
405
406
# File 'lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb', line 404

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

#sql_for_function(function) ⇒ Object



408
409
410
411
412
413
# File 'lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb', line 408

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