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