<?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 Version20240418201114 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 sale_shipment_zoom (id INT NOT NULL, dispatcher_user_id INT DEFAULT NULL, reviewer_user_id INT DEFAULT NULL, name VARCHAR(100) NOT NULL, document VARCHAR(15) NOT NULL, phone VARCHAR(15) NOT NULL, address VARCHAR(400) NOT NULL, office INT NOT NULL, destination_city INT NOT NULL, remitting_city INT NOT NULL, weight INT NOT NULL, pieces INT NOT NULL, article_value INT NOT NULL, guide_number VARCHAR(100) DEFAULT NULL, dispatch_observation VARCHAR(400) DEFAULT NULL, review_observation VARCHAR(400) DEFAULT NULL, dispatched_at DATETIME DEFAULT NULL, reviewed_at DATETIME DEFAULT NULL, INDEX IDX_8872A9CEE802A6A1 (dispatcher_user_id), INDEX IDX_8872A9CE66789B8C (reviewer_user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE sale_shipment_zoom ADD CONSTRAINT FK_8872A9CEE802A6A1 FOREIGN KEY (dispatcher_user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE sale_shipment_zoom ADD CONSTRAINT FK_8872A9CE66789B8C FOREIGN KEY (reviewer_user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE sale_shipment_zoom ADD CONSTRAINT FK_8872A9CEBF396750 FOREIGN KEY (id) REFERENCES sale_shipment (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE sale_shipment_zoom');
}
}