Sha256: f565b49fcaf4179d85dc9cf7ac0a04027feddc98c5647c64954e688c771f98dc

Contents?: true

Size: 343 Bytes

Versions: 17

Compression:

Stored size: 343 Bytes

Contents

class AddCommitterEmailToCommits < ActiveRecord::Migration
  def up
    add_column :commits, :committer_email, :string

    Commit.all.each do |commit|
      commit.update_attribute(:committer_email, commit.native_commit.committer.email) if commit.native_commit
    end
  end

  def down
    remove_column :commits, :committer_email
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
houston-core-0.8.0.pre db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.7.0 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.7.0.beta4 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.7.0.beta3 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.7.0.beta2 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.7.0.beta db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.6.3 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.6.2 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.6.1 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.6.0 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.6 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.5 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.4 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.3 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.2 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.1 db/migrate/20120626152020_add_committer_email_to_commits.rb
houston-core-0.5.0 db/migrate/20120626152020_add_committer_email_to_commits.rb