删除机器人组织的匿名评论
This commit is contained in:
parent
6fea9c2ba8
commit
b065184754
|
@ -0,0 +1,11 @@
|
|||
class DeleteAnonymousReply < 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
|
31
db/schema.rb
31
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160519070718) do
|
||||
ActiveRecord::Schema.define(:version => 20160526093715) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -77,6 +77,18 @@ ActiveRecord::Schema.define(:version => 20160519070718) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "apply_resources", :force => true do |t|
|
||||
t.integer "status"
|
||||
t.integer "user_id"
|
||||
t.integer "attachment_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "container_id"
|
||||
t.string "container_type"
|
||||
t.text "content"
|
||||
t.integer "apply_user_id"
|
||||
end
|
||||
|
||||
create_table "at_messages", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "at_message_id"
|
||||
|
@ -1107,23 +1119,6 @@ ActiveRecord::Schema.define(:version => 20160519070718) do
|
|||
t.integer "viewed_count", :default => 0
|
||||
end
|
||||
|
||||
create_table "mess", :id => false, :force => true do |t|
|
||||
t.string "课程名"
|
||||
t.integer "课程ID", :default => 0, :null => false
|
||||
t.string "教师姓", :default => "", :null => false
|
||||
t.string "教师名", :limit => 30, :default => "", :null => false
|
||||
t.string "主贴名", :default => "", :null => false
|
||||
t.integer "主贴或回帖ID", :default => 0, :null => false
|
||||
t.integer "回帖对应主贴ID"
|
||||
t.integer "帖子点赞数"
|
||||
t.integer "主贴回复数", :default => 0, :null => false
|
||||
t.text "主贴或回帖内容"
|
||||
t.datetime "发帖时间", :null => false
|
||||
t.integer "发帖或回帖用户ID", :default => 0, :null => false
|
||||
t.string "发帖或回帖用户姓", :default => "", :null => false
|
||||
t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
create_table "message_alls", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "message_id"
|
||||
|
|
Loading…
Reference in New Issue