From 0f336b6f89b77fbf625787ac28b454a16aacb00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 31 Jul 2023 00:00:57 +0200 Subject: [PATCH] Allow for longer manufacturer and supplier URLs --- migrations/Version20230730131708.php | 4 ++++ src/Entity/Parts/PartTraits/ManufacturerTrait.php | 2 +- src/Entity/PriceInformations/Orderdetail.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/migrations/Version20230730131708.php b/migrations/Version20230730131708.php index 2d5c0024..1be03725 100644 --- a/migrations/Version20230730131708.php +++ b/migrations/Version20230730131708.php @@ -21,11 +21,15 @@ final class Version20230730131708 extends AbstractMigration { // this up() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE oauth_tokens CHANGE token token LONGTEXT DEFAULT NULL, CHANGE refresh_token refresh_token LONGTEXT DEFAULT NULL'); + $this->addSql('ALTER TABLE orderdetails CHANGE supplier_product_url supplier_product_url LONGTEXT NOT NULL'); + $this->addSql('ALTER TABLE parts CHANGE manufacturer_product_url manufacturer_product_url LONGTEXT NOT NULL'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE oauth_tokens CHANGE token token VARCHAR(255) DEFAULT NULL, CHANGE refresh_token refresh_token VARCHAR(255) NOT NULL'); + $this->addSql('ALTER TABLE `orderdetails` CHANGE supplier_product_url supplier_product_url VARCHAR(255) NOT NULL'); + $this->addSql('ALTER TABLE `parts` CHANGE manufacturer_product_url manufacturer_product_url VARCHAR(255) NOT NULL'); } } diff --git a/src/Entity/Parts/PartTraits/ManufacturerTrait.php b/src/Entity/Parts/PartTraits/ManufacturerTrait.php index 71036d8c..97ef246b 100644 --- a/src/Entity/Parts/PartTraits/ManufacturerTrait.php +++ b/src/Entity/Parts/PartTraits/ManufacturerTrait.php @@ -50,7 +50,7 @@ trait ManufacturerTrait */ #[Assert\Url] #[Groups(['full', 'import'])] - #[ORM\Column(type: Types::STRING)] + #[ORM\Column(type: Types::TEXT)] protected string $manufacturer_product_url = ''; /** diff --git a/src/Entity/PriceInformations/Orderdetail.php b/src/Entity/PriceInformations/Orderdetail.php index ec5e9ce5..d61eeb68 100644 --- a/src/Entity/PriceInformations/Orderdetail.php +++ b/src/Entity/PriceInformations/Orderdetail.php @@ -75,7 +75,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N */ #[Assert\Url] #[Groups(['full', 'import'])] - #[ORM\Column(type: Types::STRING)] + #[ORM\Column(type: Types::TEXT)] protected string $supplier_product_url = ''; /**