rosa-build/db/migrate/20111128140341_rename_name_...

20 lines
657 B
Ruby
Raw Permalink Normal View History

class RenameNameAndUnixname < ActiveRecord::Migration
def self.up
2011-11-28 15:43:17 +00:00
remove_column :projects, :name
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
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