rosa-build/db/migrate/20150217215529_add_default_...

12 lines
310 B
Ruby
Raw Normal View History

class AddDefaultBranchToPlatforms < ActiveRecord::Migration
def up
add_column :platforms, :default_branch, :string
execute "UPDATE platforms SET default_branch = name"
change_column_null :platforms, :default_branch, false
end
def down
remove_column :platforms, :default_branch
end
end