The calendar supports multiple types of events: meetings, work sessions, accounting, calls and recalls and availabilities.
Availabilities can be inserted as repeated events: for example every monday from 10 to 12am. Until Obliquid 0.5.0 only the generation rule was saved into database and the derived events were computed at each page reload. Unfortunately this approach, even if works it gets easily too slow.
In new versions of Obliquid, generated events are saved in database. To distinguish the inserted events from the generated ones, the field id_categ of cal table is used. When id_categ = 0, then our availability event is an inserted event, when id_categ > 0 then it's a generated one and the value of id_categ is the id_cal of the original event.