Skip to content

Settings that are a length greater than 255 chars truncate in MySQL #22

Description

@f3ndot

Because t.string :string is used in the ActiveAdmin Settings migrations, long strings (or settings of type text) are truncated at 255 in MySQL.

The solution is to revise the migration to be the following:

# This migration comes from activeadmin_settings (originally 20121123145237)
class CreateActiveadminSettingsSettings < ActiveRecord::Migration
  def change
    create_table :activeadmin_settings_settings do |t|
      t.string :name
      t.text :string
      t.string :file

      t.timestamps
    end
  end
end

By using t.text it should allow any length, I believe.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions