gateway
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE tasks ADD COLUMN port_base INTEGER NOT NULL DEFAULT 0;
|
||||
UPDATE tasks SET port_base = (
|
||||
SELECT 41000 + 10 * (count(*) - 1) FROM tasks AS earlier
|
||||
WHERE earlier.status = 'active' AND (earlier.created_at < tasks.created_at OR (earlier.created_at = tasks.created_at AND earlier.id <= tasks.id))
|
||||
) WHERE status = 'active' AND port_base = 0;
|
||||
Reference in New Issue
Block a user