update migration script

This commit is contained in:
2020-12-17 11:04:01 +01:00
parent 2ba143e5a2
commit cdb2537d3f

View File

@@ -174,10 +174,10 @@ while($row=$queryold->fetch()) {
$nature=$row["task_nature"]; $nature=$row["task_nature"];
if($row["task_id"]<=-70) $nature=-200; if($row["task_id"]<=-70) $nature=-200;
if($row["task_id"]==-85 || $row["task_id"]==-70) $nature=-190; if($row["task_id"]==-85 || $row["task_id"]==-70) $nature=-190;
$q="INSERT IGNORE INTO task (id, name, color, quantity, validate, project_id, nature_id ) VALUES (?,?,?,?,?,?,?)"; $q="INSERT IGNORE INTO task (id, name, color, quantity, validate, project_id, nature_id, active) VALUES (?,?,?,?,?,?,?,?)";
$quantity=($row["task_quantity"]==0?null:$row["task_quantity"]); $quantity=($row["task_quantity"]==0?null:$row["task_quantity"]);
$query=$bddnew->prepare($q); $query=$bddnew->prepare($q);
$query->execute([$row["task_id"],$row["task_name"],"#".$row["task_color"],$quantity,$row["task_validate"],$row["task_project"],$nature ]); $query->execute([$row["task_id"],$row["task_name"],"#".$row["task_color"],$quantity,$row["task_validate"],$row["task_project"],$nature, 1]);
} }
writeligne(""); writeligne("");