2011-10-17 15:18:37 +01:00
|
|
|
class RepositoriesRestruct < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
change_table :repositories do |t|
|
2014-01-21 04:51:49 +00:00
|
|
|
t.references :owner, polymorphic: true
|
|
|
|
t.string :visibility, default: 'open'
|
2011-10-17 15:18:37 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
remove_column :repositories, :visibility
|
|
|
|
remove_column :repositories, :owner_id
|
|
|
|
remove_column :repositories, :owner_type
|
|
|
|
end
|
|
|
|
end
|