Task list database table
From TaskDepender
Line 32: | Line 32: | ||
OR | OR | ||
(SELECT COUNT(ContainerId) from Deliverables where Deliverables.ContainerId=t.Id AND Deliverable.CloneId=0)>0 IsContainer | (SELECT COUNT(ContainerId) from Deliverables where Deliverables.ContainerId=t.Id AND Deliverable.CloneId=0)>0 IsContainer | ||
− | + | FROM Tasks t WHERE ContainerId=(SELECT Value FROM StateVariables WHERE Key='CurrentContainerId') | |
− | + | </syntaxhighlight> | |
+ | |||
+ | === Add reference to the original task === | ||
+ | |||
+ | <syntaxhighlight lang="sql"> | ||
+ | ALTER TABLE TaskList ADD | ||
+ | Parent INTEGER REFERENCES Tasks(Id) ON DELETE CASCADE | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Fill reference field === | ||
+ | |||
+ | <syntaxhighlight lang="sql"> | ||
+ | UPDATE TasksList SET Parent=Id | ||
</syntaxhighlight> | </syntaxhighlight> | ||