forked from Gitlink/forgeplus
Merge branch 'dev_forum' of https://gitlink.org.cn/Trustie/forgeplus into dev_forum
This commit is contained in:
commit
c9237e993e
|
@ -20,7 +20,7 @@ class Memo < ApplicationRecord
|
|||
validates_presence_of :author_id, :subject,:content
|
||||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
validates_length_of :subject, maximum: 50
|
||||
validates_length_of :subject, maximum: 200
|
||||
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeMemosContentSize < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
execute("ALTER TABLE `memos` MODIFY `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue