Fixed dodo.schema to only check active tasks when assigning active id
This commit is contained in:
parent
b86ac43a25
commit
7bc91f34e6
@ -18,7 +18,7 @@ CREATE TABLE tasks(
|
||||
CREATE TRIGGER autoinc_active_id
|
||||
AFTER INSERT ON tasks
|
||||
BEGIN
|
||||
UPDATE tasks SET active_id = (SELECT COALESCE((SELECT MAX(active_id) FROM tasks) + 1, 1)) WHERE task_id=NEW.task_id;
|
||||
UPDATE tasks SET active_id = (SELECT COALESCE((SELECT MAX(active_id) FROM tasks WHERE active_id!='NULL') + 1, 1)) WHERE task_id=NEW.task_id;
|
||||
|
||||
END;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user