How does Trello show history so quickly?

后端 未结 3 755
自闭症患者
自闭症患者 2021-01-30 11:23

Trello shows a historial log of everything that any user has done since the board\'s inception. Likewise, if you click on a specific card it shows the history of anything anyone

3条回答
  •  北海茫月
    2021-01-30 12:04

    I have something very similar as @Brett from Trello answered above in my PHP + MySQL app which I use for tracking user activity in our order and production management app for our online web store.

    I have table activities which holds:

    • user_id: user that performed action
    • action_id: the action that was performed (e.g. create, update, delete, and so on...)
    • resource: the ENUM list of resources (models) that action was performed on (e.g. orders, invoices, products, etc...)
    • resource_id: PK of the resource that action was performed on
    • description: text description of the action (can be null)

    It's a large table indeed, but with right indexes it handles very well. It acts it's purpose. Is simple and fast. Currently it holds 200k records and growing with cca. 1000 new entries per day.

提交回复
热议问题