Last Updated: February 25, 2016
·
604
· rbmrclo

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