Deliverables database table - Create
From TaskDepender
(→Description) |
|||
Line 5: | Line 5: | ||
The two constraints for the table can be implemented by by referencing<ref name="referencing>[http://www.sqlite.org/foreignkeys.html#fk_actions Foreign keys - SQLite definition]</ref> these columns to the appropriate columns. This is done as follows: | The two constraints for the table can be implemented by by referencing<ref name="referencing>[http://www.sqlite.org/foreignkeys.html#fk_actions Foreign keys - SQLite definition]</ref> these columns to the appropriate columns. This is done as follows: | ||
* Delete contained deliverable when container is deleted: reference the <tt>ContainerId</tt> column to the <tt>Id</tt> of the [[Tasks database table|tasks table]]. | * Delete contained deliverable when container is deleted: reference the <tt>ContainerId</tt> column to the <tt>Id</tt> of the [[Tasks database table|tasks table]]. | ||
− | * Delete cloned deliverable when parent deliverable is deleted: self-reference the <tt>ContainerId</tt> column to the <tt>Id</tt> column | + | * Delete cloned deliverable when parent deliverable is deleted: self-reference the <tt>ContainerId</tt> column to the <tt>Id</tt> column. |
− | + | ||
The last two constraints are implemented via [[Creating a cross reference|cross-referencing]] with the [[Connections database table|<tt>Connections</tt> table]]. Consequently, the <tt>ConnectionId</tt> field is added when this table is created. | The last two constraints are implemented via [[Creating a cross reference|cross-referencing]] with the [[Connections database table|<tt>Connections</tt> table]]. Consequently, the <tt>ConnectionId</tt> field is added when this table is created. | ||
Line 20: | Line 19: | ||
Name TEXT, | Name TEXT, | ||
Description TEXT, | Description TEXT, | ||
− | |||
X INTEGER, | X INTEGER, | ||
Y INTEGER, | Y INTEGER, |