From ce545176c09dabe1e11b1a2bf465b1266231bf7a Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 14:50:14 +0300 Subject: [PATCH] ipv6 support added --- migrations/Version20230720115905.php | 2 +- src/Entity/Paste.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index 88821f2..d401f30 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -13,7 +13,7 @@ final class Version20230720115905 extends AbstractMigration public function up(Schema $schema): void { $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128), publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128), publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(39) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); } public function down(Schema $schema): void diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 9d4a42c..25489ff 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -29,7 +29,7 @@ class Paste public readonly \DateTimeImmutable $publishDate, #[ORM\Column(type: 'datetime_immutable', nullable: true)] public readonly ?\DateTimeImmutable $expirationDate, - #[ORM\Column(type: 'string', length: 15, nullable: false)] + #[ORM\Column(type: 'string', length: 39, nullable: false)] public readonly string $ip, #[ORM\Column(type: 'string', length: 40, nullable: true)] public readonly ?string $secret,