<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230919150835 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE slip (id INT AUTO_INCREMENT NOT NULL, delivery_id INT NOT NULL, reservations VARCHAR(255) DEFAULT NULL, is_returned TINYINT(1) NOT NULL, sender_signature VARCHAR(255) DEFAULT NULL, recipient_signature VARCHAR(255) DEFAULT NULL, delivery_man_pick_signature VARCHAR(255) DEFAULT NULL, delivery_man_delivery_signature VARCHAR(255) DEFAULT NULL, is_accepted TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_FD3943F812136921 (delivery_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE slip ADD CONSTRAINT FK_FD3943F812136921 FOREIGN KEY (delivery_id) REFERENCES delivery (id)');
$this->addSql('ALTER TABLE delivery_article ADD is_scanned TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE slip DROP FOREIGN KEY FK_FD3943F812136921');
$this->addSql('DROP TABLE slip');
$this->addSql('ALTER TABLE delivery_article DROP is_scanned');
}
}