<?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 Version20240306211104 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_pedidos_ya (id INT NOT NULL, dispatcher_user_id INT DEFAULT NULL, name VARCHAR(100) NOT NULL, city VARCHAR(255) NOT NULL, phone VARCHAR(15) NOT NULL, address VARCHAR(255) NOT NULL, instructions VARCHAR(255) DEFAULT NULL, estimate_id VARCHAR(40) NOT NULL, delivery_offer_id VARCHAR(40) NOT NULL, confirmation_code VARCHAR(40) NOT NULL, delivery_mode VARCHAR(20) NOT NULL, api_status VARCHAR(20) NOT NULL, distance INT NOT NULL, delivery_time_from DATETIME DEFAULT NULL, delivery_time_to DATETIME DEFAULT NULL, share_location_url VARCHAR(200) NOT NULL, online_support_url VARCHAR(200) NOT NULL, confirmation_time_limit DATETIME NOT NULL, pricing INT NOT NULL, seller_latitude NUMERIC(20, 16) NOT NULL, seller_longitude NUMERIC(20, 16) NOT NULL, client_latitude NUMERIC(20, 16) NOT NULL, client_longitude NUMERIC(20, 16) NOT NULL, dispatch_observation VARCHAR(400) NOT NULL, dispatched_at DATETIME DEFAULT NULL, delivered_at DATETIME DEFAULT NULL, INDEX IDX_B00B7BE3E802A6A1 (dispatcher_user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE sale_shipment_pedidos_ya ADD CONSTRAINT FK_B00B7BE3E802A6A1 FOREIGN KEY (dispatcher_user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE sale_shipment_pedidos_ya ADD CONSTRAINT FK_B00B7BE3BF396750 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_pedidos_ya');
}
}