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