2011-11-28 15:41:42 +00:00
|
|
|
class RenameNameAndUnixname < ActiveRecord::Migration
|
|
|
|
def self.up
|
2011-11-28 15:43:17 +00:00
|
|
|
remove_column :projects, :name
|
2011-11-28 15:41:42 +00:00
|
|
|
rename_column :projects, :unixname, :name
|
|
|
|
rename_column :platforms, :name, :description
|
|
|
|
rename_column :platforms, :unixname, :name
|
|
|
|
rename_column :repositories, :name, :description
|
|
|
|
rename_column :repositories, :unixname, :name
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
2011-11-28 15:43:17 +00:00
|
|
|
add_column :projects, :name, :string
|
2011-11-28 15:41:42 +00:00
|
|
|
rename_column :projects, :name, :unixname
|
|
|
|
rename_column :platforms, :description, :name
|
|
|
|
rename_column :platforms, :name, :unixname
|
|
|
|
rename_column :repositories, :description, :name
|
|
|
|
rename_column :repositories, :name, :unixname
|
|
|
|
end
|
|
|
|
end
|