Sha256: 80d8ab67bf85de9b04682191c5c2dd2f6f5da8390dafcb1ef43e8f9ec89dc2ee

Contents?: true

Size: 579 Bytes

Versions: 27

Compression:

Stored size: 579 Bytes

Contents

class AddVersionControlAdapterToProjects < ActiveRecord::Migration
  def up
    add_column :projects, :version_control_adapter, :string, :null => false, :default => "None"
    rename_column :projects, :git_url, :version_control_location

    Project.reset_column_information
    Project.all.each do |project|
      next if project.version_control_location.blank?
      project.update_column(:version_control_adapter, "Git")
    end
  end

  def down
    remove_column :projects, :version_control_adapter
    rename_column :projects, :version_control_location, :git_url
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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