socialforge/db/migrate/20160223021227_move_domain_...

15 lines
377 B
Ruby
Raw Normal View History

class MoveDomainToSecdomain < ActiveRecord::Migration
def up
Secdomain.transaction do
#将组织中的子域名迁移至secdomains表
2016-02-23 16:55:25 +08:00
# Organization.where("domain is not null").each do |org|
# Secdomain.create(sub_type: 2, subname: org.domain, pid: org.id)
# end
#remove_column :organizations, :domain
end
end
def down
end
end