<?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 Version20240220165914 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 cc_articulos_bloqueados (id INT AUTO_INCREMENT NOT NULL, sucursal_id INT DEFAULT NULL, codarticulo INT NOT NULL, bloqueado TINYINT(1) NOT NULL, INDEX IDX_CEB30132279A5D5E (sucursal_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE cc_articulos_bloqueados ADD CONSTRAINT FK_CEB30132279A5D5E FOREIGN KEY (sucursal_id) REFERENCES sucursal (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cc_articulos_bloqueados DROP FOREIGN KEY FK_CEB30132279A5D5E');
$this->addSql('DROP TABLE cc_articulos_bloqueados');
}
}