From ec7f79369d5028ee45c2eaa19707aba47a7dddac Mon Sep 17 00:00:00 2001 From: Fabian Wunsch Date: Mon, 15 Sep 2025 14:03:58 +0200 Subject: [PATCH] Fix migration issues --- migrations/Version20240905085300.php | 10 ++++++++++ templates/parts/info/_main_infos.html.twig | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/migrations/Version20240905085300.php b/migrations/Version20240905085300.php index 834444ae..e29d967b 100644 --- a/migrations/Version20240905085300.php +++ b/migrations/Version20240905085300.php @@ -24,6 +24,16 @@ final class Version20240905085300 extends AbstractMultiPlatformMigration $this->addSql('ALTER TABLE `parts` DROP orderamount, DROP orderDelivery'); } + public function postgreSQLUp(Schema $schema): void + { + $this->addSql('ALTER TABLE parts ADD orderamount DOUBLE PRECISION NOT NULL DEFAULT 0, ADD orderDelivery timestamp'); + } + + public function postgreSQLDown(Schema $schema): void + { + $this->addSql('ALTER TABLE parts DROP orderamount, DROP orderDelivery'); + } + public function sqLiteUp(Schema $schema): void { $this->addSql('ALTER TABLE parts ADD COLUMN orderamount DOUBLE PRECISION NOT NULL DEFAULT 0'); diff --git a/templates/parts/info/_main_infos.html.twig b/templates/parts/info/_main_infos.html.twig index 7273e8f6..f30b7407 100644 --- a/templates/parts/info/_main_infos.html.twig +++ b/templates/parts/info/_main_infos.html.twig @@ -79,10 +79,10 @@ {% if part.orderAmount > 0 %} (+ {{ part.orderAmount | format_amount(part.partUnit) }} - {% if part.orderDate %} + {% if part.orderDelivery %} @ - - {{ part.orderDate | format_date() }}
+ + {{ part.orderDelivery | format_date() }}
{% endif %} )