Sha256: c33bf3a580cf329c397e524906495ae440f45be886d02f28fcd2e5ea86aa6a55

Contents?: true

Size: 538 Bytes

Versions: 27

Compression:

Stored size: 538 Bytes

Contents

class AddExtendedAttributesToProjects < ActiveRecord::Migration
  def up
    add_column :projects, :extended_attributes, :hstore

    Project.reset_column_information

    Project.find_each do |project|
      project.extended_attributes = {
        "unfuddle_project_id" => project.ticket_tracker_id,
        "git_location" => project.version_control_location,
        "errbit_app_id" => project.error_tracker_id }
      project.save!(validate: false)
    end
  end

  def down
    remove_column :projects, :extended_attributes
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
houston-core-0.9.2 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.9.1 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.9.0 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.9.0.rc1 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.4 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.3 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.2 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.1 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.0 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.0.pre2 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.8.0.pre db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.7.0 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.7.0.beta4 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.7.0.beta3 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.7.0.beta2 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.7.0.beta db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.6.3 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.6.2 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.6.1 db/migrate/20130504014802_add_extended_attributes_to_projects.rb
houston-core-0.6.0 db/migrate/20130504014802_add_extended_attributes_to_projects.rb