操作
Enhancement(機能追加・改善) #4085
未完了Enhancement(機能追加・改善) #3571: 【負荷対策】5秒毎に最新メッセージを取得しているため、負荷対策を行う
タイムライン形式のメッセージ機能に適したテーブル定義に変更
開始日:
2016-12-27
期日:
進捗率:
0%
予定工数:
説明
テーブル定義変更案
options: charset: utf8 actAs: [Timestampable] Thread: columns: id: { type: integer(4), primary: true, autoincrement: true } name: { type: string, notnull: true } ThreadMember: columns: id: { type: integer(4), primary: true, autoincrement: true } member_id: { type: integer(4) } is_thread_block: { type: boolean, notnull: true, default: 0 } is_notification: { type: boolean, notnull: true, default: 1 } relations: Member: onDelete: set null Message: onDelete: cascade Message: columns: id: { type: integer(4), primary: true, autoincrement: true } thread_member_id: { type: integer(4), notnull: true } thread_id: { type: integer(4), notnull: true } body: { type: string, notnull: true } is_deleted: { type: boolean, notnull: true, default: 0 } return_message_id: { type: integer(4), default: null } message_type_id: { type: integer(4), notnull: true } relations: Thread: onDelete: cascade ThreadMember: onDelete: cascade Message: local: return_message_id onDelete: set null MessageType: onDelete: cascade indexes: is_deleted_thread_id_id: fields: [is_deleted, thread_id, id] MessageUnread: columns: id: { type: integer(4), primary: true, autoincrement: true } thread_member_id: { type: integer(4), notnull: true } message_id: { type: integer(4), notnull: true } relations: ThreadMember: onDelete: cascade Message: onDelete: cascade indexes: thread_member_id_message_id_UNIQUE: fields: [thread_member_id, message_id] type: unique MessageFile: columns: id: { type: integer(4), primary: true, autoincrement: true } message_id: { type: integer(4), notnull: true } file_id: { type: integer(4), notnull: true } relations: Message: onDelete: cascade File: onDelete: cascade MessageType: columns: id: { type: integer(4), primary: true, autoincrement: true } type_name: { type: string(256), notnull: true } body: { type: string, notnull: true } caption: { type: string, notnull: true } info: { type: string, notnull: true }
操作