组织子域名迁移
This commit is contained in:
parent
16efcafe77
commit
3eb7c62b85
|
@ -2,9 +2,9 @@ class MoveDomainToSecdomain < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
Secdomain.transaction do
|
Secdomain.transaction do
|
||||||
#将组织中的子域名迁移至secdomains表
|
#将组织中的子域名迁移至secdomains表
|
||||||
# Organization.where("domain is not null").each do |org|
|
Organization.where("domain is not null").each do |org|
|
||||||
# Secdomain.create(sub_type: 2, subname: org.domain, pid: org.id)
|
Secdomain.create(sub_type: 2, subname: org.domain, pid: org.id)
|
||||||
# end
|
end
|
||||||
#remove_column :organizations, :domain
|
#remove_column :organizations, :domain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue