OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add lg_id in resource picture
[pettanr/pettanr.git]
/
db
/
migrate
/
20140621054351_license_on_extend_data.rb
1
class LicenseOnExtendData < ActiveRecord::Migration
2
def up
3
ResourcePicture.all.each do |rp|
4
if rp.license_group_id.blank? or rp.license_group_id == 0
5
rp.license_group_id = rp.license.license_group_id
6
rp.boosts 'post'
7
rp.save!
8
end
9
end
10
end
11
12
def down
13
end
14
end