<?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 Version20230211232818 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('ALTER TABLE delivery_man ADD vehicle_type_id INT DEFAULT NULL, ADD is_heavy TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE delivery_man ADD CONSTRAINT FK_4E0DFC7CDA3FD1FC FOREIGN KEY (vehicle_type_id) REFERENCES vehicle_type (id)');
$this->addSql('CREATE INDEX IDX_4E0DFC7CDA3FD1FC ON delivery_man (vehicle_type_id)');
$this->addSql('ALTER TABLE user DROP uuid, CHANGE civility civility VARCHAR(5) DEFAULT NULL, CHANGE birth_date birth_date DATE DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE delivery_man DROP FOREIGN KEY FK_4E0DFC7CDA3FD1FC');
$this->addSql('DROP INDEX IDX_4E0DFC7CDA3FD1FC ON delivery_man');
$this->addSql('ALTER TABLE delivery_man DROP vehicle_type_id, DROP is_heavy');
$this->addSql('ALTER TABLE `user` ADD uuid BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', CHANGE civility civility VARCHAR(5) NOT NULL, CHANGE birth_date birth_date DATE NOT NULL');
}
}