<?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 Version20220619101920 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 sewing_gallery (id INT AUTO_INCREMENT NOT NULL, sewing_id INT DEFAULT NULL, picture VARCHAR(255) DEFAULT NULL, picture_alt VARCHAR(255) DEFAULT NULL, INDEX IDX_8E4FD852A8EBEFE2 (sewing_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE sewing_gallery ADD CONSTRAINT FK_8E4FD852A8EBEFE2 FOREIGN KEY (sewing_id) REFERENCES sewing (id)');
$this->addSql('DROP TABLE sewing_galery');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE sewing_galery (id INT AUTO_INCREMENT NOT NULL, sewing_id INT DEFAULT NULL, picture VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, picture_alt VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_63DDBD53A8EBEFE2 (sewing_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE sewing_galery ADD CONSTRAINT FK_63DDBD53A8EBEFE2 FOREIGN KEY (sewing_id) REFERENCES sewing (id)');
$this->addSql('DROP TABLE sewing_gallery');
}
}