X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=scripts%2Finit.sql;h=870e845c31827bd7400faea3e7ea877458493715;hb=5a5d713ce0b223ab2f6ef34c15bb82b614bdda98;hp=807e1e7a0fc06b3da97204e99a23b2342306272a;hpb=5195f3f36960b76d1b6530ef1822d0806db221d8;p=plomtask diff --git a/scripts/init.sql b/scripts/init.sql index 807e1e7..870e845 100644 --- a/scripts/init.sql +++ b/scripts/init.sql @@ -17,7 +17,7 @@ CREATE TABLE conditions ( is_active BOOLEAN NOT NULL ); CREATE TABLE days ( - date TEXT PRIMARY KEY, + id TEXT PRIMARY KEY, comment TEXT NOT NULL ); CREATE TABLE process_conditions ( @@ -49,7 +49,7 @@ CREATE TABLE process_fulfills ( FOREIGN KEY (condition) REFERENCES conditions(id) ); CREATE TABLE process_steps ( - step_id INTEGER PRIMARY KEY, + id INTEGER PRIMARY KEY, owner_id INTEGER NOT NULL, step_process_id INTEGER NOT NULL, parent_step_id INTEGER, @@ -108,5 +108,5 @@ CREATE TABLE todos ( is_done BOOLEAN NOT NULL, day TEXT NOT NULL, FOREIGN KEY (process_id) REFERENCES processes(id), - FOREIGN KEY (day) REFERENCES days(date) + FOREIGN KEY (day) REFERENCES days(id) );