el5j1g
Last Updated: February 25, 2016
·
438
· rbmrclo
2fe1468f365b2c131b38e87aa4acb601

Limitless strings for Postgresql

In your config/application.rb

initializer "postgresql.no_default_string_limit" do
  ActiveSupport.on_load(:active_record) do
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:string].delete(:limit)
  end
end

Don't forget run rake db:migrate

Source : http://blog.hasmanythrough.com/2011/6/1/limitless-strings-for-postgresql

Say Thanks
Respond