Skip to content

Commit

Permalink
時刻も登録できるよう、CURRENT_TIMESTAMPに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
shinya committed Sep 29, 2023
1 parent ac528c8 commit 2fc2b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/DoctrineMigrations/Version20230928014611.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function up(Schema $schema): void
foreach ($exists as $pc_id => $value) {
$stock = $this->connection->fetchOne("SELECT stock FROM dtb_product_class WHERE id = :id", ["id" => $pc_id]);
$this->addSql("DELETE FROM dtb_product_stock WHERE product_class_id = :pc_id", ["pc_id" => $pc_id]);
$this->addSql("INSERT INTO dtb_product_stock (product_class_id, creator_id, stock, create_date, update_date, discriminator_type) VALUES (:pc_id, NULL, :stock, CURRENT_DATE, CURRENT_DATE, 'productstock')", ["pc_id" => $pc_id, "stock" => $stock]);
$this->addSql("INSERT INTO dtb_product_stock (product_class_id, creator_id, stock, create_date, update_date, discriminator_type) VALUES (:pc_id, NULL, :stock, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'productstock')", ["pc_id" => $pc_id, "stock" => $stock]);
}
}
}
Expand Down

0 comments on commit 2fc2b81

Please sign in to comment.