WIP: feature_paste #1

Draft
Miroslavsckaya wants to merge 24 commits from feature_paste into master
2 changed files with 2 additions and 2 deletions
Showing only changes of commit ce545176c0 - Show all commits

View file

@ -13,7 +13,7 @@ final class Version20230720115905 extends AbstractMigration
public function up(Schema $schema): void
skobkin marked this conversation as resolved
Review

Do you need it here if it's empty?

Do you need it here if it's empty?
{
$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

View file

@ -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,
skobkin marked this conversation as resolved
Review

IPv6?

IPv6?
#[ORM\Column(type: 'string', length: 40, nullable: true)]
public readonly ?string $secret,