Cross Reference:
xref
: /
ontohub
/
db
/
migrate
/
20150420141258_add_display_name_to_prover.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
20150420141258_add_display_name_to_prover.rb revision 37cfd79b7d63403b685da17998da3c161fa30a61
class
AddDisplayNameToProver
<
MigrationWithData
def
change
add_column
:
provers
, :
display_name
, :
string
Prover.find
_each
do
|
prover
|
attrs
=
select_attributes
(
prover
, :
name
, :
display_name
)
unless
attrs
[:
display_name
]
attrs
[:
display_name
] =
attrs
[:
name
]
update_attributes
!
(
prover
,
attrs
)
end
end
end
end