Skip to content

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

@f3ndot

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.

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