Allow for longer manufacturer and supplier URLs

This commit is contained in:
Jan Böhmer 2023-07-31 00:00:57 +02:00
parent 43cc37d10f
commit 0f336b6f89
3 changed files with 6 additions and 2 deletions

View file

@ -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');
}
}

View file

@ -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 = '';
/**

View file

@ -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 = '';
/**