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
Written by Robbie Marcelo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Activerecord
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#