rosa-build/db/migrate/20120220185458_remove_repos...

14 lines
373 B
Ruby

# -*- encoding : utf-8 -*-
class RemoveRepositoriesOwner < ActiveRecord::Migration
def self.up
remove_column :repositories, :owner_id
remove_column :repositories, :owner_type
Relation.delete_all(:target_type => 'Repository')
end
def self.down
add_column :repositories, :owner_id, :integer
add_column :repositories, :owner_type, :string
end
end