Sha256: cb8a248fd2241656a57ad52e8ab62203842d95b62a6ab5e9056ac9c1c05d5035

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 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

1 entries across 1 versions & 1 rubygems

Version Path
houston-core-0.5.0.beta1 db/migrate/20130504014802_add_extended_attributes_to_projects.rb