<?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 Version20220407214957 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 move_store_to_store (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, from_store_id INT NOT NULL, to_store_id INT NOT NULL, product_store_id INT NOT NULL, isActive TINYINT(1) DEFAULT NULL, date DATETIME NOT NULL, update_at DATETIME NOT NULL, quantity DOUBLE PRECISION NOT NULL, INDEX IDX_D635CE6BB03A8386 (created_by_id), INDEX IDX_D635CE6B896DBBDE (updated_by_id), INDEX IDX_D635CE6BF67D488B (from_store_id), INDEX IDX_D635CE6B7DCB36BF (to_store_id), INDEX IDX_D635CE6B7B22C286 (product_store_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE move_store_to_store ADD CONSTRAINT FK_D635CE6BB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE move_store_to_store ADD CONSTRAINT FK_D635CE6B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE move_store_to_store ADD CONSTRAINT FK_D635CE6BF67D488B FOREIGN KEY (from_store_id) REFERENCES store (id)');
$this->addSql('ALTER TABLE move_store_to_store ADD CONSTRAINT FK_D635CE6B7DCB36BF FOREIGN KEY (to_store_id) REFERENCES store (id)');
$this->addSql('ALTER TABLE move_store_to_store ADD CONSTRAINT FK_D635CE6B7B22C286 FOREIGN KEY (product_store_id) REFERENCES product_store (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE move_store_to_store');
}
}