Tasks database table
From TaskDepender
(→Design) |
(→Design) |
||
Line 36: | Line 36: | ||
The following actions are defined on the tasks table: | The following actions are defined on the tasks table: | ||
− | ;Create:When a new project is created, the tasks table must be created as well. When creating the table, the constraint must be implemented that when the task is contained in a container which is deleted, the task needs to be deleted as well. This is done by self-referencing the <tt>ContainerId</tt> column to the <tt>Id</tt> column. | + | ;Create:When a new project is created, the tasks table must be created as well. When creating the table, the constraint must be implemented that when the task is contained in a container which is deleted, the task needs to be deleted as well. This is done by self-referencing the <tt>ContainerId</tt> column to the <tt>Id</tt> column. However, because of the reference to the resource, the tasks table must be created ''after'' the [[Resources database table|resources table]] |
;Insert:Since a task can only be added in the current container, the <tt>ContainerId</tt> does not have to be supplied but can be retrieved from the [[State variables database table|<tt>StateVariables</tt>]] table. | ;Insert:Since a task can only be added in the current container, the <tt>ContainerId</tt> does not have to be supplied but can be retrieved from the [[State variables database table|<tt>StateVariables</tt>]] table. |