Sha256: 7025e342e03064801f5ebdd96ebe4bff55a0fbb938fd507362cd8fd11607fe37

Contents?: true

Size: 574 Bytes

Versions: 27

Compression:

Stored size: 574 Bytes

Contents

class AddTicketTrackingAdapterToProjects < ActiveRecord::Migration
  def up
    add_column :projects, :ticket_tracking_adapter, :string, :null => false, :default => "None"
    rename_column :projects, :unfuddle_id, :ticket_tracking_id

    Project.reset_column_information
    Project.all.each do |project|
      next if project.ticket_tracking_id.blank?
      project.update_column(:ticket_tracking_adapter, "Unfuddle")
    end
  end

  def down
    remove_column :projects, :ticket_tracking_adapter
    rename_column :projects, :ticket_tracking_id, :unfuddle_id
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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