<?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 Version20230907062601 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 eshop_basket (id INT AUTO_INCREMENT NOT NULL, eshop_order_id INT DEFAULT NULL, basket_content LONGTEXT DEFAULT NULL, INDEX IDX_7471A62809649AF (eshop_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE eshop_basket ADD CONSTRAINT FK_7471A62809649AF FOREIGN KEY (eshop_order_id) REFERENCES `order` (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE eshop_basket DROP FOREIGN KEY FK_7471A62809649AF');
$this->addSql('DROP TABLE eshop_basket');
}
}