From 160b05ae8986151ff959b1ca0924c7d377f6d95f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Jul 2016 16:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8C=BF=E5=90=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20160722074421_delete_org_anonymous.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20160722074421_delete_org_anonymous.rb diff --git a/db/migrate/20160722074421_delete_org_anonymous.rb b/db/migrate/20160722074421_delete_org_anonymous.rb new file mode 100644 index 000000000..fe796f3c5 --- /dev/null +++ b/db/migrate/20160722074421_delete_org_anonymous.rb @@ -0,0 +1,11 @@ +class DeleteOrgAnonymous < ActiveRecord::Migration + def up + anonymous_replys = OrgDocumentComment.where("organization_id = 23 AND creator_id = 2") + if anonymous_replys + anonymous_replys.destroy_all + end + end + + def down + end +end