<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230509142000 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 cash_register_bundle__shop ADD warehouse_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\'');
$this->addSql('ALTER TABLE cash_register_bundle__shop ADD CONSTRAINT FK_70F2E5415080ECDE FOREIGN KEY (warehouse_id) REFERENCES stocks_bundle__warehouse (id)');
$this->addSql('CREATE INDEX IDX_70F2E5415080ECDE ON cash_register_bundle__shop (warehouse_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cash_register_bundle__shop DROP FOREIGN KEY FK_70F2E5415080ECDE');
$this->addSql('DROP INDEX IDX_70F2E5415080ECDE ON cash_register_bundle__shop');
$this->addSql('ALTER TABLE cash_register_bundle__shop DROP warehouse_id');
}
}