12 lines
310 B
Ruby
12 lines
310 B
Ruby
|
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
|