Skip to content

Instantly share code, notes, and snippets.

@joshsusser
Created May 29, 2011 19:20
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshsusser/998055 to your computer and use it in GitHub Desktop.
Save joshsusser/998055 to your computer and use it in GitHub Desktop.
turn off 255 limit for string fields in postgresql
# in rails 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment