Project

General

Profile

Actions

Enhancement(機能追加・改善) #4085

open

Enhancement(機能追加・改善) #3571: 【負荷対策】5秒毎に最新メッセージを取得しているため、負荷対策を行う

タイムライン形式のメッセージ機能に適したテーブル定義に変更

Added by Shinichi Urabe about 8 years ago. Updated over 6 years ago.

Status:
Accepted(着手)
Priority:
Normal(通常)
Target version:
Start date:
2016-12-27
Due date:
% Done:

0%

Estimated time:

Description

テーブル定義変更案


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 }


Actions #1

Updated by Shinichi Urabe about 8 years ago

  • Parent task set to #3571
Actions #2

Updated by Shinichi Urabe about 8 years ago

  • Description updated (diff)
  • Status changed from New(新規) to Accepted(着手)
Actions #3

Updated by Shinichi Urabe about 8 years ago

  • Target version changed from 2.0.0.2 alpha 2 to 2.0.0.3 alpha 3
Actions #4

Updated by Shinichi Urabe over 7 years ago

  • Target version changed from 2.0.0.3 alpha 3 to 2.0.0.4 alpha 4
Actions #5

Updated by kaoru n over 6 years ago

  • Target version changed from 2.0.0.4 alpha 4 to Unplanned
Actions

Also available in: Atom PDF