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

21 lines
684 B
Ruby
Raw Normal View History

2012-01-30 20:39:34 +00:00
# -*- encoding : utf-8 -*-
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