From 3eb7c62b85e97833d883488f96947f674878d026 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 23 Feb 2016 17:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=AD=90=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20160223021227_move_domain_to_secdomain.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/migrate/20160223021227_move_domain_to_secdomain.rb b/db/migrate/20160223021227_move_domain_to_secdomain.rb index 95a3b3634..0c78f0ac6 100644 --- a/db/migrate/20160223021227_move_domain_to_secdomain.rb +++ b/db/migrate/20160223021227_move_domain_to_secdomain.rb @@ -2,9 +2,9 @@ class MoveDomainToSecdomain < ActiveRecord::Migration def up Secdomain.transaction do #将组织中的子域名迁移至secdomains表 - # Organization.where("domain is not null").each do |org| - # Secdomain.create(sub_type: 2, subname: org.domain, pid: org.id) - # end + 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