Created
July 16, 2019 17:51
-
-
Save saml/c9f5f035c3125b8f45eeae3d0df2b23e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table task( | |
id int primary key, | |
status varchar(10) | |
); | |
create table subtask( | |
id int primary key, | |
task_id int references task(id), | |
status varchar(10) | |
); | |
insert into task values (1, 'ready'); | |
insert into subtask values (1, 1, 'ready'); | |
insert into subtask values (2, 1, 'ready'); | |
insert into subtask values (3, 1, 'processing'); | |
-- when all subtasks are ready, I want task to be ready |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment