Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Temporal logic used for history
  • Think about a Model which has a status code column. This can be only an integer or a relation to a Model_*_Status, it doesn't matter. You want to track the history of status changes, view some data from the first revision (eg creation time).

    Is Temporal logic a good choice for this? As I see temporal model is to preserve data change history. When it comes to preserve only specific fields, is temporal logic a good idea? Or creating a history table, and tracking the status code and the date is better.
  • It depends.

    If you want the complete previous object back, Temporal is the correct choice. If you want an audit log of who has changed what, a separate log table is a better choice.
  • Even the who is a useless information. Tha actual use case is tracking the change of the status code.
  • HarroHarro
    Accepted Answer
    If you're only interested in one field (for example to plot changes against time, like in a server up or down), I would use a seperate table.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion