appelier / bigtuna

Continuous Integration software written on top of Ruby on Rails 3 and DelayedJob.
http://bigtuna.appelier.com
273 stars 65 forks source link

MySQL: Text field for output too short #78

Open gorenje opened 13 years ago

gorenje commented 13 years ago

Hi,

the output fields on build_parts and builds are both text types, which means that when using MySQL* these are truncated to 64K characters. This might be fine for most things, but is insufficient if the output of bundle install and rake db:migrate are included and then a bunch of test outputs.

class OutputNeedsToBeLongtextWithMysql < ActiveRecord::Migration
  def self.up
    change_column :build_parts, :output, :longtext
    change_column :builds, :output, :longtext
  end

  def self.down
    change_column :build_parts, :output, :text
    change_column :builds, :output, :text
  end
end

the migration has no effect using sqlite but does change the column to longtext when using mysql. The commit is on a branch on my fork.

*=http://www.electrictoolbox.com/maximum-length-mysql-text-field-types/

antekpiechnik commented 12 years ago

Hey man, would you like to make this a pull request ?

gorenje commented 12 years ago

no problem, created #94