Sha256: babcdadd021a0f7c5c560a86f4441dd5a63ca902a6d04b453f28ec55cd1f42fb

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

class ExtendPagePartContentLimit < ActiveRecord::Migration
  def self.up
    if ActiveRecord::Base.connection.adapter_name =~ /m[sy]sql/i
      # Make sure text longer than 64kB is not cropped in MySQL and MSSQL
      # See https://github.com/radiant/radiant-sheets-extension/issues/10
      change_column :page_parts, :content, :text, :limit => 1048575
    end
  end

  def self.down
    if ActiveRecord::Base.connection.adapter_name =~ /m[sy]sql/i
      change_column :page_parts, :content, :text
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
trusty-cms-1.0.0 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.4 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.3 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.2 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.1 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.0 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.0.rc1 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.0.beta db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.0.1 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.1.0.alpha db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.0.0 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.0.0.rc5 db/migrate/20111016150725_extend_page_part_content_limit.rb
radiant-1.0.0.rc4 db/migrate/20111016150725_extend_page_part_content_limit.rb